Understanding function arguments

I found this function in Laravel, and I wonder how to read the arguments in this function. There are two arguments Request and $request, but no seperation (with comma)

use Illuminate\Http\Request;

public function show(Request $request) {

}

In this function I can access the variable $request

That’s a type declaration, for a class/interface name - PHP: Type declarations - Manual

1 Like

Thank you! I did read the page, and it is clear now.

Sponsor our Newsletter | Privacy Policy | Terms of Service