Created
September 23, 2016 01:12
-
-
Save Sarav-S/455f2ea58ba6d3f27b1fa72a36b27552 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! function_exists('admin') ) | |
{ | |
/** | |
* Returns the admin session instance | |
* | |
* @return mixed | |
*/ | |
function admin() | |
{ | |
return auth()->guard('admin')->user(); | |
} | |
} | |
if (! function_exists('isAdminLoggedIn') ) | |
{ | |
/** | |
* Determines if admin is logged in. | |
* | |
* @return boolean True if admin logged in, False otherwise. | |
*/ | |
function isAdminLoggedIn() | |
{ | |
return auth()->guard('admin')->check(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment