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

dmcglone27's avatar

has anytything changed?

Has something changed with Laravel that I don't know about? I've done this hundreds of times and for some reason this simple form doesn't work. It keeps telling me WelcomeConroller@store isn't defined.. This is a fresh install of Laravel. All I'm doing is setting up a simple application to practice inserting into a pivot table. But now I've got thrown off track because something screwed up.

Here's the error

InvalidArgumentException
Action WelcomeController@store not defined. (View: /home/david/www/roles/resources/views/welcome.blade.php)

Here's my Conroller... Am I blind or is @store defined here!

public function store(Request $request, Role $roles)
    {
        $roles = $roles->create($request->all());

        return redirect()->back();
    }

Here's my form:

@foreach ($roles as $role)
        {!! Form::model('role', ['method' => 'POST', 'action' => ['WelcomeController@store']]) !!}
        {!! Form::checkbox($role, $role->name) !!}
    @endforeach
    {!! Form::submit !!}
    {!! Form::close() !!}

Here's my route

Route::resource('/', App\Http\Controllers\WelcomeController::class);

and for good measure here's the list of routes and I see @store there..

Domain	Method	URI	Name	Action	Middleware
GET|HEAD	/	index	App\Http\Controllers\WelcomeController@index	web
POST	/	store	App\Http\Controllers\WelcomeController@store	web
GET|HEAD	api/user		Closure	api
App\Http\Middleware\Authenticate:sanctum
GET|HEAD	create	create	App\Http\Controllers\WelcomeController@create	web
GET|HEAD	sanctum/csrf-cookie		Laravel\Sanctum\Http\Controllers\CsrfCookieController@show	web
GET|HEAD	{}	show	App\Http\Controllers\WelcomeController@show	web
PUT|PATCH	{}	update	App\Http\Controllers\WelcomeController@update	web
DELETE	{}	destroy	App\Http\Controllers\WelcomeController@destroy	web
GET|HEAD	{}/edit	edit	App\Http\Controllers\WelcomeController@edit	web
0 likes
6 replies
dmcglone27's avatar

Never mind! It seems the full path is required on forms now... Is this true? :-/

App\Http\Controllers\WelcomeController@store

Also, for future reference where do I look for changes like these with laravel? Surely there's a place that documents these changes.

jlrdw's avatar
jlrdw
Best Answer
Level 75

Changes will be in the upgrade guide even if you don't upgrade a good place to look.

2 likes
Sinnbeck's avatar

I assume you are refering to this line?

        {!! Form::model('role', ['method' => 'POST', 'action' => ['WelcomeController@store']]) !!}

If you are, then that isnt laravel. That is Laravel Collective (a package) https://laravelcollective.com/docs/6.x/html

Maybe it now expects the new tuple syntax

{!! Form::model('role', ['method' => 'POST', 'action' => [WelcomeController::class, 'store']]) !!}

https://laravel.com/docs/8.x/upgrade#automatic-controller-namespace-prefixing

1 like
dmcglone27's avatar

@Sinnbeck I love Laravel Collective.. lol

I tried your suggestion, just to see if it would work and it was a no go. :-/

Please or to participate in this conversation.