Haring10 Haring10 - 1 year ago 73
PHP Question

Laravel 5.2 Only one specific route not found, but it does exist

No matter what I try, the route

returns a

My route in routes.php:

Route::get('/authenticate/{code}', ['as' => 'authenticate', 'uses' => 'FrontendController@getAuthenticate']);

When I am calling the route:

URL::route('authenticate', $code)

On my local machine it runs it just fine, but on my production server, it takes me to a

It does site inside of the
middleware group.

I have tried (with no success):

  • resetting the github repo on the server (fresh install)

  • composer update

  • php artisan cache:clear

  • php artisan view:clear

  • php artisan route:clear

  • php artisan config:clear

  • composer dump-autoload

  • changing the route from

What could it be? Every other route on the site works, it is just this one that doesnt.

Answer Source

The only thing I can think to advise is switching from using the URL Facade to using the built in helper function $url = route('authenticate', ['code' => $code]); I only say this because I can't seem to find in the docs how you hint at URI parameters when using URL::route() :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download