how to return with open model popup in laravel 1

how to return with open model popup in laravel

//pass back a variable when redirecting
return Redirect::back()->with('error_code', 5);

//in blade tempalte
@if(!empty(Session::get('error_code')) && Session::get('error_code') == 5)

@endif
  
//second seneario use like this
  
//@sujay

Here is what the above code is Doing:
1. You’re setting a variable in the session called error_code.
2. You’re redirecting back to the previous page.
3. You’re checking if the error_code variable is set and if it is, you’re showing the modal.

Similar Posts