Can you paste in the code of the fields() method of the Client resource?
Anything else changed in \App\Nova\Client ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using Nova and for a nova resource:"Client" that I needed I created a new migration with the following command:
$ php artisan make:migration create_clients_table --create=clients
added the necessary fields and created the table "clients" :
$ php artisan migrate
then created the corresponding Model "Client":
$ php artisan make:model Client
Check that everything went well by adding some clients to the table using tinker:
>>> $client = new App\Client()
>>> $client->name = "Lucas"
>>> $client->company = "GMC"
>>> $client->mail = "[email protected]"
>>> $client->save()
Finally crated the resource "Client" with:
$ php artisan nova:resource Client
So far so good. Everything quite simple.
In Nova, the Client resource is available and in the listing I see all the test clients added in tinker, the view page and delete work as well but, after adding the required fields, when I try to click on Create Client or update an existing client (i.e.: Lucas) I get the following error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.client' doesn't exist (SQL: select count(*) as aggregate from 'client' where 'email'[email protected])
I don't understand why is trying to query the client table in singular
Any ideas will be greatly appreciated. Thanks in advance
Please or to participate in this conversation.