Skip to content

Commit

Permalink
Allow string IDs (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
rojtjo authored May 12, 2024
1 parent 29a1d49 commit f7fe2b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/FilamentFabricatorManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function getPageUrls(): array
});
}

public function getPageUrlFromId(int $id, bool $prefixSlash = false): ?string
public function getPageUrlFromId(int|string $id, bool $prefixSlash = false): ?string
{
$url = $this->getPageUrls()[$id];

Expand Down
4 changes: 2 additions & 2 deletions src/Models/Contracts/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
use Illuminate\Database\Eloquent\Relations\HasMany;

/**
* @property-read int $id
* @property-read int|string $id
* @property-read string $title
* @property-read string $slug
* @property-read string $layout
* @property-read array $blocks
* @property-read int $parent_id
* @property-read int|string $parent_id
* @property-read \Illuminate\Database\Eloquent\Collection|\Z3d0X\FilamentFabricator\Models\Contracts\Page[] $children
* @property-read \Illuminate\Database\Eloquent\Collection|\Z3d0X\FilamentFabricator\Models\Contracts\Page[] $allChildren
* @property-read \Illuminate\Support\Carbon $created_at
Expand Down

0 comments on commit f7fe2b2

Please sign in to comment.