Accessing The Request: Accessing The Request Via Route Closures

Accessing The Request Via Route Closures

Use Illuminate\Http\Request;

Route::get('/', function (Request $request) {
    //
});

You may also type-hint the Illuminate\Http\Request class on a route Closure.

Related concepts

Accessing The Request: Accessing The Request Via Route Closures — Structure map

Clickable & Draggable!

Accessing The Request: Accessing The Request Via Route Closures — Related pages: