Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
abordage committed Jul 6, 2022
1 parent d370ee1 commit e6b0cda
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/Card.stub
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Abordage\TableCard\TableCard;
class {{ class }} extends TableCard
{
/**
* Name of the card.
* Name of the card (optional, remove if not needed)
*/
public string $title = 'card-title';

Expand Down
10 changes: 10 additions & 0 deletions src/TableCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

class TableCard extends Card
{
/**
* Name of the card (optional, remove if not needed)
*/
public string $title = '';

public array $rows = [];

public function __construct()
Expand All @@ -20,6 +24,12 @@ public function __construct()
$this->rows = $this->rows();
}

/**
* Array of table rows
*
* Required keys: title, viewUrl
* Optional keys: subtitle, editUrl
*/
public function rows(): array
{
return [];
Expand Down

0 comments on commit e6b0cda

Please sign in to comment.