vendredi 17 novembre 2017

Larevel routing and prefix

I have a problem with the routes groups prefix in Laravel. I have a routes group like so:

Route::group(['middleware'=>'web', 'prefix'=>'messanger', 'namespace'=>'App\Modules\Messanger\Controllers'], function(){
Route::get('/inbox', ['as'=>'messanger.inbox', 'uses'=>'MessangerController@inbox']);

now when ever i load the view it adds the prefix to the beginnig of the URI BUT it does it to all my images or js or css links so they break and never load the required resources like this:

<script src="prefix/js/script.js">

where what i need is:

<script src="/js/script.js">

any idea on how to keep the prefix without breaking my resources links



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2zbWmgP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire