I\'m trying to build my routes using resources so that I can pass two parameters into my resources.
I\'ll give you a few examples of how the URLS would look:
For the request like '/project/100/file/56968', you must specify your route like this:
Route::resource('project.file', 'FileController');
And then you can get parameters at the show method of the controller:
public function show($project, $file) {
dd([
'$project' => $project,
'$file' => $file
]);
}
The result of this example will be:
array:2 [▼
"$project" => "100"
"$file" => "56968"
]