1193 1 0 0
Last Updated : 2025-09-18 19:56:40
Laravel automatically checks for errors in the session data and so, an $errors variable is actually always available on all your views. If you want to display a modal when there are any errors present, you can try something like this:
Laravel automatically checks for errors in the session data and so, an $errors
variable is actually always available on all your views. If you want to display a modal when there are any errors present, you can try something like this:
<script type="text/javascript">
@if (count($errors) > 0)
$('#model_id').modal('show');
@endif
</script>