All language subtitles for 006 Request Input (Reading User Input)_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
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
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

Original subtitles

Apart from the root parameters, you can accept arbitrary input as the Querrey parameters data sent

through an HTML form or request body interface and format.

Before we talk forms and sending Jason, so let's cover simple query parameters example.

Input is accessible using the request object methods.

But first, how do we get access to the request object?

There are two ways, either using the request function or by type printing argument with the request

klutzes.

When using type hinting, make sure you import proper request glass.

From exactly this namespace, this might be confusing as there are more request classes than just this.

Make sure you just import the correct one.

Now, both ways are correct, we will stick with using the function.

The old method will give us access to all the inputs, but not the actual root parameters, if you have

any.

Let's try it out on the post listing route.

Try adding some coded parameters like page and limit, often used to populate results.

So this is how you add query parameters that are the limit and page parameter.

Now, to actually see that this input is being available, we will use the function dedi function can

be used to quickly dump data.

It's a shortcut for dump and dye, the data will go on screen and execution will stop.

So let's Dedede request all.

Now, refresh this page.

And there are this, all the input in form of the query parameters that we have passed to disrupt.

Now, you've probably noticed that the old method returns an array, now individual fields can be retrieved

using their request object input method.

It allows you to specify a default value to ask the second parameter, let's try it out with Page.

Sure to comment out the first line.

This actually stops execution, let's refresh.

So now the page is provided and it is five.

Notice how it is actually a string, even though you pass a number.

But then when you remove this parameter from the query, you get a default value, which is one.

So if you care about types and probably in 2020, you should you actually should always cast those values

to a number.

If you care for a number, then with default you've got a number.

And also when you pass the value, you've got a number.

Now, since all and input methods work with all possible input, whether it is a query parameter or

request body, there is a special query method if you want to get the value only from a query parameter.

So let's try it out.

The query method.

Well, it essentially works the same as the input method does.

As I said, input will look for the names in all the possible input.

Sources like Query Parameters, Data Center, a form or Jason and query is specifically for query parameters

only.

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