Laravel 5 Route Model Binding not working on server
After going through the same issue, I discovered that in production, storage/framework/compiled.php
doesn't get rebuilt regularly like in development mode.
Basically, you are just running an old version of RoutesServiceProvider.php on your production server.
The fix is easy enough though. Just run php artisan clear-compiled
.
It would be a good practice to add line to any deployment scripts as well.