Request::user PHP 메소드

user() 공개 정적인 메소드

Get the user making the request.
public static user ( string | null $guard = null ) : mixed
$guard string | null
리턴 mixed
        public static function user($guard = null)
        {
            return \Illuminate\Http\Request::user($guard);
        }

Usage Example

예제 #1
0
 public function getTickets()
 {
     if (\Request::ajax()) {
         $tickets = \Request::user()->tickets()->with('event')->orderBy('created_at', 'desc')->paginate(15);
         return \Response::json($tickets);
     }
     return \Response::json(['status' => 'error'], 400);
 }
All Usage Examples Of Request::user