Skip to content

Commit

Permalink
Fix generator return type
Browse files Browse the repository at this point in the history
  • Loading branch information
miguilimzero committed Aug 6, 2023
1 parent 7cbdcc5 commit 4c1f918
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Generators/PageGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Miguilim\FilamentAutoResource\Generators;

use Filament\Resources\Pages\PageRegistration;
use Miguilim\FilamentAutoResource\Filament\Pages\FilamentAutoResourceCreate;
use Miguilim\FilamentAutoResource\Filament\Pages\FilamentAutoResourceEdit;
use Miguilim\FilamentAutoResource\Filament\Pages\FilamentAutoResourceList;
Expand All @@ -11,22 +12,22 @@ class PageGenerator
{
public static array $generatedPageClasses = [];

public static function makeList(string $resource): array
public static function makeList(string $resource): PageRegistration
{
return static::generateAnonymousClass(FilamentAutoResourceList::class, $resource)::route('/');
}

public static function makeCreate(string $resource): array
public static function makeCreate(string $resource): PageRegistration
{
return static::generateAnonymousClass(FilamentAutoResourceCreate::class, $resource)::route('/create');
}

public static function makeView(string $resource): array
public static function makeView(string $resource): PageRegistration
{
return static::generateAnonymousClass(FilamentAutoResourceView::class, $resource)::route('/{record}');
}

public static function makeEdit(string $resource): array
public static function makeEdit(string $resource): PageRegistration
{
return static::generateAnonymousClass(FilamentAutoResourceEdit::class, $resource)::route('/{record}/edit');
}
Expand Down

0 comments on commit 4c1f918

Please sign in to comment.