DevMarketer / multiauth_tutorial

156 stars 83 forks source link

Upgrade to laravel 5.8 #27

Open x-ciphers opened 5 years ago

x-ciphers commented 5 years ago

i am facing error while upgrade to laravel 5.8 Error : route:cache 'Unable to prepare route [api/user] for serialization. Uses Closure.' #22034 Thanks

 

susantp commented 5 years ago

comment all closure function then you will be able to cache all routes.

GauravSinghPawar commented 5 years ago

This worked for me in Laravel 5.8 ... use Illuminate\Support\Facades\Route; ... protected function redirectTo($request) { if (! $request->expectsJson()) { if (Route::is('admin.*')) { return route('admin.login'); } return route('login'); } }