if(!Auth::isAdmin()){ header('Location: login.php'); exit; }
if(Auth::isAdmin()){ // show admin content } else { // hide admin content }This Auth isAdmin function is a part of several PHP packages or libraries including the Laravel Authentication package, CakePHP Auth component, Symfony Security component.