Closed sijn82 closed 4 years ago
EDIT: After playing around with it a little I ended up just trying
Route::view('/admin', 'admin')->middleware('auth:admin');
on the route in web.php and it's behaving as I expected/wanted. Now navigating to the '/admin' url redirects to the 'login/admin' unless it's a valid user. Was this missing from your tutorial steps or have I bypassed key functionality or basically done something weird by taking this approach? Thanks.
Hi , Just make sure to include : use Exception; use Request; use Illuminate\Auth\AuthenticationException; use Response; in handler file :)
update the repo please...
Route::view('/admin', 'admin')->middleware('auth:admin'); Route::view('/writer', writer')->middleware('auth:writer');
I spent lot while doing this multi auth and its working fine now.. Written Tutor https://codemeda.com/how-to-use-multiple-authentication-table-in-laravel-app/ Git repo https://github.com/lanwilds/laravel-multi-auth-guards
Hi guys,
I'll like to apologize for this really late response. The codebase has been updated,
I no longer directly maintain this codebase. Should you have new suggestions and fixes, please do submit a PR. Raising a PR will go a long way instead of issues.
Thank you
Thanks for your great tutorial, I found it easy to follow and understand (or so I'd thought 😉 ) each part of the process. However even though I haven't created any users for the site yet, I can still access the '/admin' and '/writer' pages and see the logged in message. Did I misunderstand a step? Or basically where would you look to diagnose this issue?
This is the app/Exceptions/handler (nb as you can see I changed the /writer for /warehouse but otherwise mirrored the tutorial exactly.
I'm using Laravel 5.7 in the latest Homestead box.
Thanks for any advice, and for the informative tutorial.