Fix: Making base form input with @error laravel
In Laravel, you can create a base form input with the `@error` directive to easily handle input errors and old input values. Here's how you can do it: 1. **Create a Base Input Component:** Laravel allows you to create Blade components to encapsulate reusable UI elements. You can create a base input component to handle form inputs. First, create a Blade component file, e.g., `resources/views/components/form-input.blade.php`. In this file, you can define the structure of your input element and handle errors: ```blade <div class="form-group"> <label for="{{ $name }}">{{ $label }}</label> <input type="{{ $type }}" name="{{ $name }}" id="{{ $name }}" class="form-control @error($name) is-invalid @enderror" value="{{ old($name) ?? $value }}"> @error($name) <span class="invalid-feedback" role="alert"> <strong&