PHP code snippet – 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) <script> $(function() { $('#myModal').modal('show'); }); </script> @endif //second seneario use like this <script type="text/javascript"> @if(!empty(Session::get('error_code'))) <?php $a = Session::get('error_code'); ?> $('#updateCarModel{{ $a }}').modal('show'); console.log("#updateCarModel{{ $a }}"); @endif </script> //@sujay
Curly hair, very fair, please share 🙂
Related
after return back() modal pop up, How to display data in modal popup laravel, how to redirect to modal with errors without closing in in laravel, how to return with open modal popup in laravel, how to return with open model popup in laravel, how to show popup form when click on data in laravel, laravel blade only create modal if a value exists, laravel redirect back and keep modal opened, laravel redirect back with popup, laravel return modal view, laravel return redirect to modal, laravel return with modal, open modal popup in laravel from response, open up form in modal once returns from controller laravel, redirect after form submit modal laravel, redirecting to a view modal, return back a html popup window in laravel, return back to modal in website from lara, return modal with message laravel, return with popup laravel, show modal with form laravel