Do you have something that checks the database in the formRequest class such as a unique rule or exists rule?
Can you show the formRequest class?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I had form validation for some page content editing working.
I then decided that I need another category of page and content types so I changed the Content Model name and table names from Content and contents to InfoContent and info_contents respectively.
Up to this point, everything was still working.
I then changed the name of the working request validator from UpdateContentRequest.php to UpdateInfoContentRequest.php. and then changed it accordingly in the Class usage and InfoContentController update method eg;
use App\Http\Requests\UpdateInfoContentRequest;
public function update(UpdateInfoContentRequest $request, $id)
Now when I try to save any InfoContent changes to the database, I get the following error;
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app_database.contents' doesn't exist
So rather than using the table defined by the model, app_database.info_contents, the validator is looking for the original table name, ie; app_database.contents.
If I disable the call to the validator in the controller update method, ie;
public function update(Request $request, $id)
then it works again albeit without validation.
I thought perhaps that the validator might be registered somehow when it is created via the Artisan command so I tried creating a new one with the proper name , ie; UpdateInfoContentRequest.php but it still causes the validation to look for the old table name.
So I seem to be missing something, any ideas?
Do you have something that checks the database in the formRequest class such as a unique rule or exists rule?
Can you show the formRequest class?
Please or to participate in this conversation.