you should show your Controller methods ;-)
method name comes after the @
UsersController@storeCustomer
so storeCustomer would be the method in UsersController here.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hey guys,
I am Working on my first Laravel project and I am also new to routing and controllers at all.
Well, at the beginning I had a UsersController withe the functions create, store, update and so on and in http/requests/ a UserRequest. All users were by default customers. Then I had to do the same for users that were employees. First I used the same store and update function for both of them and put a lot if-Conditions in those functions for almost any input.
What I actually had to do is creating customerRequest and EmployeeRequest instead of one UserRequest and having in my Userscontrollers the functions StoreCustomer and StoreEmployee instead of just store.
I tried adding this line to the routes: Route::post('users/{user}', 'UsersController@storeCustomer');
and I get, when submitting : BadMethodCallException Method [store] does not exist.
But how do I tell laravel which function it has to take?
Please or to participate in this conversation.