php - Laravel 4 User Authorization and Views -
php - Laravel 4 User Authorization and Views -
so working on website, writing using laravel , semantic ui. part of site, users can log in page , 1 time logged in should correctly redirected whatever page on. however, 1 time logged in, part of ui should alter show logged in, opposed showing login button.
is there easy way this? various answers have seen here rely on having multiple blade templates, 1 users not logged in , user are. ideally, prefer have single blade template (called master) override section of when user correctly authenticated. ideally, logic not tied specific controller or route.
then may utilize in master
layout:
@if(auth::check()) {{ 'user logged in, show logout button' }} @else {{ 'user not logged in, show login button' }} @endif
php authentication laravel-4 blade
Comments
Post a Comment