codezero-be / laravel-localized-routes

⭐️ A convenient way to set up and use localized routes in a Laravel app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting error on production but local is not happening this error

raymondugv opened this issue · comments

commented

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.

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?

commented

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?

commented

I've made it work by running composer dumpautoload.

and it works like a charm.

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