Support the ongoing development of Laravel.io →
Requests Views Laravel.io
Last updated 1 year ago.
0

You can set URL back in url creat room or in hotel Route set session URL back and call it in postStore method

domain.com/room/create?ref=domain.com/hotel/example

OR

Route::get('/hotel/{slug}', function($slug){
	$id = Hotel::whereSlug($slug)->firstOrFail()->id;
	$hotel = Hotel::find($id);
	Session::set('url_back', URL::route('hotel',$slug));
	return View::make('hotel') ->with('hotel', $hotel);
});
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Finsok333 finsok333 Joined 23 Dec 2014

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.

© 2024 Laravel.io - All rights reserved.