Answer the question
In order to leave comments, you need to log in
What is the name of this piece of code?
Hello, I started to study OOP in more detail. I delved into LARAVEL from the point of view of how it works.
And I came across that in functions, instead of a data type, they use this:
They use the Request class located in Illuminate\Http\Request, as I understand it.
What is it called to google? I want to understand how it works.
use Illuminate\Http\Request; (пространство имен)
class Far
{
---> public function test (Request $request) {
return $request;
}
}
Answer the question
In order to leave comments, you need to log in
Read about: dependency injection Have
a look here: https://laravel.com/docs/5.6/container
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question