Suppose I have a login form and a bootstrap modal inside it and after checking login authentication from a controller, I want to pass data to that bootstrap modal. So how can I activate that modal from controller passing data to that modal?
Asked
Active
Viewed 81 times
-1
-
2Please show/add some of your code. – Digvijay Jul 05 '20 at 05:03
-
This is possible, read carefully this part of the Bootstrap 4 modal explanation : https://getbootstrap.com/docs/4.3/components/modal/#varying-modal-content – Dimitri Mostrey Jul 05 '20 at 05:06
1 Answers
0
I solved this problem. I passed the data from controller like this
return view('welcome', ['getData'=>$getData]);
and then i checked condition if there is present data then i showed the modal.
@if(isset($getData))
<script>
$('#resultModal').modal('show')
</script>
@endif

Binay7587
- 15
- 1
- 5