Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Emyking's avatar

I'm getting an error each time i run "php artisan make:filament-resource Category --generate"

TypeError

Filament\Commands\MakeResourceCommand::getModelSchema(): Return value must be of type Illuminate\Support\Facades\Schema, Illuminate\Database\Schema\MySqlBuilder returned

at vendor\filament\support\src\Commands\Concerns\CanReadModelSchemas.php:26 22▕ protected function getModelSchema(string $model): Schema 23▕ { 24▕ return app($model) 25▕ ->getConnection() ➜ 26▕ ->getSchemaBuilder(); 27▕ } 28▕ 29▕ protected function getModelTable(string $model): string 30▕ {

1 vendor\filament\forms\src\Commands\Concerns\CanGenerateForms.php:18 Filament\Commands\MakeResourceCommand::getModelSchema("App\Models\Category")

2 vendor\filament\filament\src\Commands\MakeResourceCommand.php:206 Filament\Commands\MakeResourceCommand::getResourceFormSchema("App\Models\Category")

0 likes
0 replies

Please or to participate in this conversation.