src/Models/Agent.php
public static function isAgent($id = null)
    {
        if (isset($id)) {
            $user = User::find($id);
            if ($user->ticketit_agent) {
                return true;
            }

            return false;
        }
        if (auth()->check()) {
            if (auth()->user()->ticketit_agent) {
                return true;
            }
        }
    }
public static function isAgent($id = null)
    {
        if (isset($id)) {
            $user = User::find($id);
            if ($user->ticketit_agent) {
                return true;
            }

            return false;
        }
        if (auth()->check()) {
            if (auth()->user()->ticketit_agent) {
                return true;
            }
        }
    }
public static function isAgent ( $ id = null ) { if ( isset ( $ id ) ) { $ user = User :: find ( $ id ) ; if ( $ user -> ticketit_agent ) { return true ; } return false ; } if ( auth ( ) -> check ( ) ) { if ( auth ( ) -> user ( ) -> ticketit_agent ) { return true ; } } }
Check if user is agent.

@return bool
Check if user is agent .