Answer the question
In order to leave comments, you need to log in
Why in the controller method to specify the Request type for the argument?
Here is a controller method in Laravel, why specify the Request type?
I understand why this is needed here (with a simple type):
public function store(Request $request) { }
function test(int $x) {
return $x;
}
var_dump(test(1.6)); // 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question