codezero-be / laravel-localized-routes

⭐️ A convenient way to set up and use localized routes in a Laravel app.
MIT License
492 stars 45 forks source link

Getting error on production but local is not happening this error #24

Closed raymondugv closed 4 years ago

raymondugv commented 4 years ago

Hi,

I'm using laravel 5.6 and I've received this error screen when published the code to staging and production server, but on localhost, it works very well.

image

Could you please show me how to fix this or what is the information you need to help me on this matter?.

Thank you.

ivanvermeyen commented 4 years ago

Hello,

If I understand it correctly, the router is not finding the localized macro for some reason. It's a bit of a tough one to reproduce, because I'm already running tests for each Laravel / PHP version from 5.6 / 7.1 and up.

Do route macro's work at all in your app? Is the ServiceProvider being discovered?

Can you reproduce the issue in a new app so I can take a look at it and see if I find anything unusual?

raymondugv commented 4 years ago

Hi @ivanvermeyen ,

Thank for your reply. This is my Service Providers image

Since I'm a newbie in Laravel developing, could you please show me how to check it?

raymondugv commented 4 years ago

I've made it work by running composer dumpautoload.

and it works like a charm.

ivanvermeyen commented 4 years ago

Nice to hear that it's working :) Dump autoload has saved me a few times in the past as well :)