Gaurav Singh
Gaurav Singh

Reputation: 79

Issue with routes in Laravel 5.2

facing a strange situation in laravel 5.2 The project is hosted on godaddy with shared hosting plan. I've already defined few routes in routes.php and all are working fine. Recently I've added 3 more under auth middleware, and now those 3 new routes are not working on server. However they're working fine on my localhost. Triple checked the routes.php on server and the code is there.

Route::get('contact','ContactusController@index');

This url is giving following error :

NotFoundHttpException in RouteCollection.php line 161:

and the url mentioned above / below those lines are working fine.

Any suggestions ?

Upvotes: 4

Views: 217

Answers (1)

Peter
Peter

Reputation: 630

The OP probably cached his routes using route:cacheon the production server, so any changes will require him to clear the route cache via php artisan route:clear for the new changes to take effect.

Pros to route caching: Sitespeed gets faster
Cons to route caching: Requires to re-cache every time a change is made so its usually only done so on a production server.

Upvotes: 2

Related Questions