src/Traits/Tokenable.php
public function getLastToken($type, $key = 'type')
    {
        return $this->token()->orderBy('tokens.created_at', 'desc')->where($key, $type)->first();
    }
public function getLastToken($type, $key = 'type')
    {
        return $this->token()->orderBy('tokens.created_at', 'desc')->where($key, $type)->first();
    }
public function getLastToken ( $ type , $ key = 'type' ) { return $ this -> token ( ) -> orderBy ( 'tokens.created_at' , 'desc' ) -> where ( $ key , $ type ) -> first ( ) ; }
Get the last Token by the type.
@param   string  $type
@param   string  $key
@return  Token
Get the last Token by the type .