This has nothing to do with your backend. You can manually open the modal after refresh if the form has errors.
@if(session()->has('error'))
<script>
$('#add_post_modal').modal('show');
</script>
@endif
Found this article related to your problem :
https://dev.to/ara225/how-to-use-bootstrap-modals-without-jquery-3475
It doesn't have jQuery, but the concept is the same. You can use plain JS or check Bootstrap's doc on how to do it.
Try this out:
@if(session()->has('error'))
<script>
var myModal = new bootstrap.Modal(document.getElementById('add_post_modal'));
myModal.show();
</script>
@endif
Link to the official bootstrap 5 documentation manually open modal
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community