Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to initiate this package? #51

Closed
Heqma opened this issue Jun 1, 2021 · 6 comments
Closed

How to initiate this package? #51

Heqma opened this issue Jun 1, 2021 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@Heqma
Copy link

Heqma commented Jun 1, 2021

"
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');
@chinleung chinleung added the question Further information is requested label Jun 1, 2021
@chinleung
Copy link
Owner

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?

@chinleung chinleung self-assigned this Jun 1, 2021
@Heqma
Copy link
Author

Heqma commented Jun 1, 2021

image
image
i dont know why my route group isnt work... i have 404.. with group routes.. i

@chinleung
Copy link
Owner

chinleung commented Jun 1, 2021

@Heqma There's currently an issue with prefixes. I'll be working on this soon. For the moment, you can do it without the prefix method.

I'll be closing this since it's a duplicate of #50.

@Heqma
Copy link
Author

Heqma commented Jun 1, 2021

Ok then... also i need to know why translate isn't work...
image
image

Facade\Ignition\Exceptions\ViewException Route [contact.store] not defined

@chinleung
Copy link
Owner

@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.

@Heqma
Copy link
Author

Heqma commented Jun 1, 2021

image

image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants