FavoriteLoadingAdd to favorites

When making a route you can set a null-able parameter, this will save you in terms of routing like doing an if, and if the parameter is there or not you can then perform your actions based on those parameter rules.

You would write is like so.

Not null-able does not have a Question Mark

Route::get('home'/{action}, function($action){
     return $action;
});

Null-able does have a Question Mark

Route::get('home'/{action?}, function($action){
     return $action;
});

Pin It on Pinterest

Share This