protected function getUserId()
    {
        try {
            if (Auth::check()) {
                return Auth::user()->getAuthIdentifier();
            }
        } catch (Exception $e) {
            Log::emergency($e);
            return;
        }

        return;
    }
protected function getUserId()
    {
        try {
            if (Auth::check()) {
                return Auth::user()->getAuthIdentifier();
            }
        } catch (Exception $e) {
            Log::emergency($e);
            return;
        }

        return;
    }
protected function getUserId ( ) { try { if ( Auth :: check ( ) ) { return Auth :: user ( ) -> getAuthIdentifier ( ) ; } } catch ( Exception $ e ) { Log :: emergency ( $ e ) ; return ; } return ; }
Get user id.

@return null
Get user id .