Answers for "laravel with errors custom"

PHP
1

laravel custom error page

php artisan vendor:publish --tag=laravel-errors
Posted by: Guest on April-27-2021
0

$errors show this error in laravel

<input type="text" name="firstname">
@if($errors->has('firstname'))
    <div class="error">{{ $errors->first('firstname') }}</div>
@endif
Posted by: Guest on November-07-2020
1

how to add an custom error to validater error in laravel

if (request('event') == null) {
    $validator->errors()->add('event', 'Please select an event');
}
Posted by: Guest on October-20-2020

Browse Popular Code Answers by Language