How can I display the validation message in the view that is being redirected in Laravel ?
Here is my function in a Controller
publi
@if ($errors->has('category'))
<span class="error">{{ $errors->first('category') }}</span>
@endif
{!! Form::text('firstname', null !!}
@if($errors->has('firstname'))
{{ $errors->first('firstname') }}
@endif
A New Laravel Blade Error Directive comes to Laravel 5.8.13
// Before
@if ($errors->has('email'))
<span>{{ $errors->first('email') }}</span>
@endif
// After:
@error('email')
<span>{{ $message }}</span>
@enderror