Support the ongoing development of Laravel.io →
Requests Database Views
Last updated 1 year ago.
0

You defined your route:

Route::get('projects/projectDetails/{$id}', 'ProjectController@viewProject');

which is URI: project/projectDetails/{$id} which would be:

URL::to("project/projectDetails/{$pro->id}")
0

lagbox said:

You defined your route:

Route::get('projects/projectDetails/{$id}', 'ProjectController@viewProject');

which is URI: project/projectDetails/{$id} which would be:

URL::to("project/projectDetails/{$pro->id}")

@lagbox thx for your reply

but I didn't understand how should I define my route Sorry but you didn't clear you answer

I try to define my Route this way the same problem is there

Route::get('URI:project/projectDetails/{$id}', 'ProjectController@viewProject');
Last updated 7 years ago.
0
Solution
URL::to("project/projectDetails/{$pro->id}")

That is how you generate a url to http://yoursite.com/project/projectDetails/XXX.

Route::get('projects/projectDetails/{id}', 'ProjectController@viewProject');

Would be how you would define that route for that URI.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

johnef johnef Joined 18 May 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.