Prerequisites
Before you begin, ensure you have:- Completed the Installation steps
- A working Laravel application
- Basic knowledge of Laravel Blade templates
Create Your First Form
Let’s build a user profile form that demonstrates the key features of Javaabu Forms.Create the Controller
Create a controller to handle the form:Add the following methods to
app/Http/Controllers/ProfileController.php:What Just Happened?
Let’s break down the key features you just used:Model Binding
The@model($user) directive automatically binds the user model to the form. All form components within this block will retrieve their values from the model:
Automatic Validation Errors
When validation fails, errors are automatically displayed below each field. No need to manually check for errors:Method Spoofing
The form component handles HTTP method spoofing for PUT/PATCH/DELETE requests:CSRF Protection
CSRF tokens are included automatically:Common Patterns
Creating vs Editing Forms
Use the same form for both create and edit actions by conditionally binding the model:Inline Forms
Create horizontal forms with labels beside inputs:Floating Labels
Use Bootstrap 5’s floating labels:Next Steps
Core Concepts
Learn about model binding, validation errors, and Blade directives
Form Inputs
Explore all available input components
Advanced Features
Discover Select2, WYSIWYG editors, file uploads, and more
Configuration
Customize framework settings, icons, and component defaults
Need Help?
- Check the Requirements if you encounter issues
- Browse the component documentation for detailed usage
- Visit the GitHub repository to report issues