-1

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?

Binay7587
  • 15
  • 1
  • 5

1 Answers1

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