public function store(Request $request) { }
function test(int $x) {
return $x;
}
var_dump(test(1.6)); // 1
To obtain an instance of the current HTTP request via dependency injection, you should type-hint the Illuminate\Http\Request class on your route closure or controller method. The incoming request instance will automatically be injected by the Laravel service container