All language subtitles for 005 Grouping Routes_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: WEBVTT 00:01.180 --> 00:09.160 In the past few lectures, we have added a lot of roots and they all have the same common property, 00:09.640 --> 00:15.840 the same prefix slash farm in Laravel, you can group roots. 00:16.360 --> 00:19.030 This group Roots can share the same attributes. 00:19.960 --> 00:28.930 Groups of roots can have the same prefix, the same roots, name prefix or the same middleware applied. 00:29.680 --> 00:32.140 We haven't talked about the media word yet. 00:32.950 --> 00:36.930 So let's see an example we can understand right now. 00:37.840 --> 00:45.730 So let's give all foreign roots the same Eurail prefix and the same name prefix. 00:48.390 --> 00:57.600 Root grouping starts with calling the root class static methods, applying the common properties in 00:57.600 --> 01:04.440 our case prefix for the usual prefix, which would be fun. 01:06.740 --> 01:14.550 And name for the rude name prefix, in our case, let's use fun dots. 01:16.190 --> 01:23.120 Finally, we call a group that accepts an anonymous function. 01:28.270 --> 01:35.290 Inside this anonymous function, we now move all rude declarations that should have above parameters 01:35.290 --> 01:35.980 applied. 01:43.060 --> 01:55.030 Now, be sure to add the new statement for any variables from outside the context that post in our example. 01:57.410 --> 02:04.850 Now let's open the terminal and run a bipartisan route, at least to see all the route definitions from 02:04.850 --> 02:05.550 our up. 02:07.490 --> 02:12.410 Now you should see that all the fun routes have the fun prefix added. 02:12.440 --> 02:14.990 So now we have fun twice. 02:15.830 --> 02:21.080 And also the names have the fun dots prefix applied to them. 02:21.740 --> 02:28.460 So the final step in here would be to clean it up, which won't be fun actually, as we have to remove 02:28.460 --> 02:31.670 this fun prefix from all rude names. 02:32.720 --> 02:38.150 That's the whole point of grouping not to have to repeat the same text or same attributes. 02:38.810 --> 02:43.220 And also it would be decent to give all those roots are specific name. 02:43.970 --> 02:45.860 So I'll do that in this video. 02:46.040 --> 02:47.540 But we don't really have to watch this. 02:47.880 --> 02:51.290 You can grab the code from GitHub or just leave it as it is. 02:58.410 --> 03:06.450 Wolf, finally, so we can see this part wasn't fun, but not everything in programming is fun. 03:06.660 --> 03:09.310 So now let's see the list again. 03:10.380 --> 03:15.210 OK, now we have the prefix without specifying it explicitly for every route. 03:15.210 --> 03:20.930 And also we have the name prefix and they all look really nice right now. 2723

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.