Answers for "laravel 8 validated(exept"

PHP
1

laravel exists validation

'state_id' => 'exists:states,id'
Posted by: Guest on January-18-2021
2

laravel get errors from validator blade

<!-- /resources/views/post/create.blade.php -->

<h1>Create Post</h1>

@if ($errors->any())
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

<!-- Create Post Form -->
Posted by: Guest on August-22-2020

Browse Popular Code Answers by Language