Installation
Install the Javaabu Forms package in your Laravel application using Composer.Install via Composer
Run Composer Require
Install the package using Composer:The package uses Laravel’s auto-discovery feature, so the service provider will be registered automatically.
No additional configuration is required to start using the package. It works out of the box with Bootstrap 5.
Publishing Assets (Optional)
You can optionally publish configuration files, views, and translations to customize the package behavior.Publish Configuration File
Publish the configuration file to customize framework settings, icons, and default behavior:config/forms.php with the following options:
Publish Views
Publish the Blade view templates to customize the HTML markup of form components:resources/views/vendor/forms/ with subdirectories for each framework:
Publish Translations
Publish translation files to customize labels and messages (like the required field indicator):lang/vendor/forms/.
By default, required fields show an asterisk (*) next to the label. Publish translations to change this to text like “(Required)” or another language.
Custom Artisan Commands
The package registers two helpful Artisan commands for managing view customization:Publish Specific Views
Compare View Changes
Environment Variables
Add these optional environment variables to your.env file:
.env
Blade Directives
The package automatically registers two Blade directives for model binding:@model($model)- Start model binding scope@endmodel- End model binding scope
<x-forms::form> component and can be used standalone:
Component Namespace
All form components are registered under theforms namespace:
FormsServiceProvider.php:
Next Steps
Requirements
Verify your PHP and Laravel versions meet the minimum requirements
Quickstart
Create your first form with model binding in under 5 minutes