vendredi 1 juillet 2016

Laravel pass variable from FirstController to SecondController

This is my two routes which pass variable on each view.

Route::resource('product', 'ProductController');
Route::resource('booking', 'BookingController');

I created a view which display the current product (ex. http://localhost:8000/product/15) using the ProductController.

Now i created another view to book this product then insert it (modal pop up) inside the product view using @include('partials.booking').

The problem is how can i pass the product id to the BookingController? It is possible?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire