Missing required Parameters for [Route]

Asked

Viewed 3,392 times

0

I’m having trouble pinpointing the route because of the two parameters it has.

Route::prefix('auction')->namespace('Auction')->name('auction.')->group(function() {
    Route::get('delegations/{auction}/view/{lot}', 'AuctionDelegatorsController@delegation')->name('delegations');

and the url I’m trying to point out is:

@slot('url') {{route('auction.delegations', $auction, $lot)}} @endslot

The error it returns is as follows

Missing required parameters for [Route: auction.delegations] [URI: auction/delegations/{auction}/view/{lot}]

I can’t make it work, someone could help me see where I’m going wrong?

1 answer

0


I was able to fix using an associative array for the parameters.

{{route('auction.delegations',['auction'=> $auction,'lot' => $lot])}}

this way he understood the path of the route with the two parameters that I sent in my route: {auction} {lot} should be passed to the route as ['auction'=> $auction,'lot' => $lot]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.