app/User.php
/*
     * Find user information based on secret_id
     * Laravel take primary field as email id but here I need secret_id
     */
Find user information based on secret_id
Laravel take primary field as email id but here I need secret_id
Find user information based on secret_id Laravel take primary field as email id but here I need secret_id
public function findForPassport($identifier) {
        try {
            $currentUser = $this->orWhere('secret_id', $identifier)->first();
            if(!$currentUser)
                return null;
            $currentUser->role = $currentUser->roles->first()->name;
            return $currentUser;
        }catch (Exception $e){
            return null;
        }
    }
public function findForPassport ( $ identifier ) { try { $ currentUser = $ this -> orWhere ( 'secret_id' , $ identifier ) -> first ( ) ; if ( ! $ currentUser ) return null ; $ currentUser -> role = $ currentUser -> roles -> first ( ) -> name ; return $ currentUser ; } catch ( Exception $ e ) { return null ; } }
Find user information based on secret_id
 Laravel take primary field as email id but here I need secret_id
Find user information based on secret_id Laravel take primary field as email id but here I need secret_id