© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Eric

Does --generate flag work when creating a resource?

To test it I:

1- Updated filament libs (
composer update
composer update
) & cleared cache
php artisan optimize:clear
php artisan optimize:clear


2- Created a model + migration:
Model -> Item
Migration -> just added a string field called 'email'

3- Ran:
php artisan make:filament-resource Item --generate
php artisan make:filament-resource Item --generate


4- My ItemResource.php is empty
public static function table(Table $table): Table
{
    return $table
        ->columns([
            //
        ])

...

public static function form(Form $form): Form
{
    return $form
        ->schema([
            //
        ]);

...
public static function table(Table $table): Table
{
    return $table
        ->columns([
            //
        ])

...

public static function form(Form $form): Form
{
    return $form
        ->schema([
            //
        ]);

...

I expected the form to have a text input field and the table a text column

can anyone reproduce it too, or it's me im missing something?
last time i did this it just worked, not sure if an update broke it or what is happening
Solution
i found it - missed to migrate -
php artisan migrate
php artisan migrate
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Specify a directory when creating a resource
FilamentFFilament / ❓┊help
2y ago
Accessing parent resource when creating nested resource
FilamentFFilament / ❓┊help
6mo ago
Weird behavior when creating resource
FilamentFFilament / ❓┊help
2y ago
hiddenOn returns an error when creating a resource
FilamentFFilament / ❓┊help
2y ago