@if(session()->has('notify'))
    @foreach(session('notify') as $msg)
        <script type="text/javascript">
            "use strict";
			Toast('{{ $msg[1] }}', '{{ $msg[0] }}');
        </script>
    @endforeach
@endif

@if ($errors->any())
    @php $collection = collect($errors->all()); $errors = $collection->unique(); @endphp
    <script>
        "use strict";
        @foreach ($errors as $error)
			Toast('{{ $error }}', 'warning');
        @endforeach
    </script>
@endif
