SC
Size: a a a
SC
Gt
SC
SC
SC
.
SC
Gt
SC
SC
AH
app('router')->get('qwerty/{foo}/{bar}/{baz}', 'TestController');
GET {{host}}/api/qwerty/4/6/2?baq=666
Content-Type: application/json
/{foo}/{bar}
(/1/2
).index($foo, $bar)
// $foo = 1
// $bar = 2
index($bar, $foo)
// $foo = 2
// $bar = 1
index(Category $foo, Page $bar)
// Вернёт ок
index(Category $bar, Page $foo)
// Вернёт ошибку TypeError
// Argument 1 passed to App\\Http\\Controllers\\TestController::index() must be an instance of App\\Models\\Category, instance of App\\Models\\Page given"
AH
AH
AH
AH
AH
AH
AH
SC
.