larakit/laravel-larakit-bootstrap-form
@form or @input replace manual Bootstrap HTML, reducing manual markup by ~30–50% for standard forms.$request->validate()) via Form::validate() or Blade directives, but requires explicit mapping between package methods and Laravel’s validation pipeline.Form classes if using Livewire’s form components. Mitigate via namespace aliases or custom prefixes.bootstrap@5.x).laravelcollective/html).composer require larakit/laravel-larakit-bootstrap-form.php artisan vendor:publish --tag=larakit-bootstrap-form.config/app.php.webpack.mix.js or Vite.@form(['route' => 'profile.update'])).@form(['method' => 'PUT', 'route' => 'posts.update', 'post.id'])
@input('text', 'title', 'Post Title', ['required'])
@button('primary', 'Update')
@endform
FormRequest classes or inline:
@input('email', 'user_email', 'Email', ['required', 'email'])
actingAs() and post() methods._partials/form.blade.php).@foreach loops with @input).@input('select', 'category_id') with lazy-loaded categories).throttle middleware).| Risk | Impact | Mitigation |
|---|---|---|
| Bootstrap version mismatch | Forms render incorrectly. | Pin Bootstrap version in package.json. |
| Laravel validation conflicts | Form submission fails silently. | Test with dd($errors) in FormRequest. |
| CSRF token issues | Form submissions rejected. | Ensure @csrf is included or package auto-generates it. |
| JavaScript dependencies | Interactive elements break. | Use bootstrap.bundle.js if needed. |
| Package abandonment | No updates for Laravel 10+. | Fork or migrate to livewire/forms. |
<!-- resources/views/auth/login.blade.php -->
@form(['route' => 'login'])
@input('email', 'email', 'Email', ['required'])
@input('password', 'password', 'Password', ['required'])
@button('primary', 'Login')
@endform
How can I help you explore Laravel packages today?