php - Route pattern cannot reference variable name "trip_id" more than once

791

i am calling an edit page with some id. Its route is as follows:

Route::get('edit_vid/{trip_id}', '[email protected]');

but when i call this url(route) it gives me following error

Route pattern "/video/{trip_id}/{{trip_id}}" cannot reference variable name "trip_id" more than once.

i have another route which is totaly different from this one

Route::resource('video/{trip_id}', '[email protected]');

you can see there is no similarity in them except id.. i dont know at where i am doing mistake.. please guide me.. i am beginner in laravel. please help

487

Answer

Solution:

as per Vipul comment.. i changed

Route::resource('video/{trip_id}', '[email protected]');

to this

Route::get('video/{trip_id}', '[email protected]');

and it worked well.. issue resolved.

People are also looking for solutions to the problem: php - Issue with multiple mysql joins

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.