Support the ongoing development of Laravel.io →
Requests Eloquent Views

When I use a show($id) function called with a wild card route, the resulting view appends a directory on to all urls causing them to be invalid - here is my route:

route::get('setmeeting/{id}', 'SetmeetingController@show');

and here is the show function in my controller

 $myvar = Mymodel::find($id);
        return view('setmeeting', compact('myvar'));

and here is the view code (it does pass the data correctly)

            <p>{{ $myvar->name }}</p>

The view has the correct data in it, but all of my JS tags and styles have 'setmeeting' appended in their urls and 404 error out.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

pentelicus pentelicus Joined 31 May 2015

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.

© 2025 Laravel.io - All rights reserved.