Closed mjavadtatari closed 1 year ago
This change was introduced with Laravel 8.0, see: https://laravel.com/docs/8.x/upgrade#automatic-controller-namespace-prefixing
It's highly likely unrelated to this package, this is how Laravel 8+ works
@mjavadtatari , to resolve this issue, you will need to add protected $namespace = 'App\Http\Controllers';
to your RouteServiceProvider in app/Providers/RouteServiceProvider.php
Adding the above line of code will allow you access your controller and action within the action attribute of your html form without having to use the complete path to the controller.
Hope this helps.
thank you so much @kelseygreat
Hello, According to the Docs at [laravelcollective.com](https://laravelcollective.com/docs/6.x/html#opening-a-form), we should use
echo Form::open(['action' => 'Controller@method'])
format.I tried this:
{!! Form::open(['action'=>'PostsController@store']) !!}
it's not working, the Error message: InvalidArgumentException: Action PostsController@store not defined.
but I tried full address and worked:
{!! Form::open(['action'=>'App\Http\Controllers\PostsController@store']) !!}
I would appreciate it if you could help me.
Php Version: 8.1.5 Laravel Version: 9.14.1