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

anjanesh's avatar

Resources are not registered automatically

I got a unlimited nova license today.

php artisan make:model Company -m
# Added a bunch of fields in database/migrations/2022_06_06_104331_create_companies_table.php
php artisan migrate

After installing nova as per the docs, I did php artisan nova:resource Company and I even see a page http://localhost:8000/nova/resources/companies but when I try to Create Company, it just refreshes. I don't see a form to enter the details.

As mentioned above, you are not required to manually register your resources

0 likes
2 replies
vincent15000's avatar

I don't know nova, but it looks like a cache problem.

Have you tried to empty the cache of the browser ?

Or perhaps to renew the config and view cache ?

anjanesh's avatar

@vincent15000 No, I don't think refresh was the issue - I had to edit app/Nova/Company.php to include this all :

            Text::make('Name')
                ->sortable()
                ->rules('required', 'max:255'),

            Text::make('Address')
                ->sortable()
                ->rules('required', 'max:255'),

            Text::make('City')
                ->sortable()
                ->rules('required', 'max:255'),

            Text::make('State')
                ->sortable()
                ->rules('required', 'max:255'),

            Text::make('Country')->default('India')
                ->sortable()
                ->rules('required', 'max:255'),

            Text::make('Zipcode')
                ->sortable()
                ->rules('required', 'max:255'),

Only then these fields would show up in the Nova admin - I thought these would automatically show up in the admin by 'looking' into the database's table.

Please or to participate in this conversation.