How to initiate this package?
Heqma opened this issue · 6 comments
"
UnexpectedValueException
Invalid route action: [App\Http\Controllers\FrontController].
App\Http\Controllers\FrontController
is not invokable.
The controller class App\Http\Controllers\FrontController is not invokable. Did you forget to add the __invoke method or is the controller's method missing in your routes file?"
controller
Route::redirect('/', locale());
Route::multilingual('/', 'FrontController')->name('index');
The controller class App\Http\Controllers\FrontController is not invokable. Did you forget to add the __invoke method or is the controller's method missing in your routes file?
@Heqma Can you show the contents of the FrontController please? Do you have an __invoke
method?
@Heqma When you use the name
method, it adds the locale prefix to the route's name. So it would either be pl.contact.store
or en.contact.store
. Or you can use the helper localized_route('contact.store')
.
You can view the list of your application's routes with php artisan route:list
to confirm their names.