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

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Route::get('home'/{action}, function($action){
return $action;
});
Route::get('home'/{action}, function($action){ return $action; });
Route::get('home'/{action}, function($action){
     return $action;
});

Null-able does have a Question Mark

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Route::get('home'/{action?}, function($action){
return $action;
});
Route::get('home'/{action?}, function($action){ return $action; });
Route::get('home'/{action?}, function($action){
     return $action;
});

Pin It on Pinterest

Garth Baker
Favorite
Loading
en
af
sq
am
ar
hy
az
eu
be
bn
bs
bg
ca
ceb
ny
zh-CN
zh-TW
co
hr
cs
da
nl
en
eo
et
tl
fi
fr
fy
gl
ka
de
el
gu
ht
ha
haw
iw
hi
hmn
hu
is
ig
id
ga
it
ja
jw
kn
kk
km
ko
ku
ky
lo
la
lv
lt
lb
mk
mg
ms
ml
mt
mi
mr
mn
my
ne
no
ps
fa
pl
pt
pa
ro
ru
sm
gd
sr
st
sn
sd
si
sk
sl
so
es
su
sw
sv
tg
ta
te
th
tr
uk
ur
uz
vi
cy
xh
yi
yo
zu
Share This