Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
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.