dimanche 29 novembre 2015

laravel view and data loading

i have a route defined in my route.php file like this:

Route::get('{username}/{search_term}', 'userProfileSearchController@search');

in my controller i retrieve the user model from db by the username and then performing a search query for finding the results based on the passed term then i redirect the to a view like below:

return view('profile', compact('result'));

but the problem is it doesn't redirect to view properly instead of redirecting to profile view with just the result variable i gave it redirects like this http://ift.tt/1TkQEJu and my stylesheets and scripts doesn't load on page because of the wrong url laravel is giving!
so they trying to load in page with this url:

http://ift.tt/1IhuQNY



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire