leetbacoon
0
Q:

routing in laravel

Route::get('user/{id}', function ($id) {
    return 'User '.$id;
});
2
Route::pattern('id', '[0-9]+');
Route::get('user/{id}', function ($id) {
    // Only executed if {id} is numeric...
});
2
Route::view('/welcome', 'welcome');

Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
0
Route::view('/welcome', 'welcome');
Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
0
Route::get('posts/{post}/comments/{comment}', function ($postId, $commentId) {
    //
});
0

New to Communities?

Join the community