1155 1 0 0
Last Updated : 2025-04-29 00:17:21
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>