Posts

Showing posts with the label Laravel Authorization

Can Anyone Explain Laravel 5.2 Multi Auth With Example

Answer : After lots of digging and lots of questions & answers I have finally managed to work Laravel 5.2 Multi Auth with two table, So I'm writing Answer of my own Question. How to implement Multi Auth in Larvel 5.2 As Mentioned above. Two table admin and users Laravel 5.2 has a new artisan command. php artisan make:auth it will generate basic login/register route , view and controller for user table. Make a admin table as users table for simplicity. Controller For Admin app/Http/Controllers/AdminAuth/AuthController app/Http/Controllers/AdminAuth/PasswordController (note: I just copied these files from app/Http/Controllers/Auth/AuthController here) config/auth.php //Authenticating guards 'guards' => [ 'user' =>[ 'driver' => 'session', 'provider' => 'user', ], 'admin' => [ 'driver' => 'session', 'pro...