jeudi 30 août 2018

Passing multiple parameters with laravel routes but keep the url "clean" (without showing them)

I'm actually working on an application using php framework Laravel.

I've hitted a problem since i need to open a modification form with two parameters. I pass them in my url like so :

<tr class="beBlack" onclick="document.location = '/showGriefs//'">

(i know that it is sketchy to create a link within a table but i need the url to change according to wich row is clicked/selected)

and i recieve them in the following route:

Route::any('/showGriefs/{No_Grief}/{No_Employe}', 'GriefController@showGrief')->name('showGriefs');

My problem is that i don't want my url to change, because, with these url changes, my application can't find the files (CSS, JS and Plugins). And since laravel is using the public directory to store all those files, it's destroying my page. The only errors i get is some missing flies error.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire