Answer the question
In order to leave comments, you need to log in
How to pass second optional parameter to router?
Too few arguments to function App\Http\Controllers\HomeController::showCar(), 1 passed and exactly 2 expected
Route::get('/home/{car}/{id?}', '[email protected]');
Answer the question
In order to leave comments, you need to log in
It does not need to be passed , it needs to be made optional , it is ... optional ...
public function showCar(Car $car, $id = null)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question