Repository navigation
getting started
Jacob Martella edited this page Jan 8, 2026
·
1 revision
Get up and running with ArtisanPack UI Forms in minutes.
Install the package via Composer:
composer require artisanpack-ui/formsPublish the configuration file and migrations:
php artisan vendor:publish --provider="ArtisanPackUI\Forms\FormsServiceProvider"php artisan migrate- Navigate to
/admin/forms(or your configured admin prefix) - Click "Create Form"
- Add fields using the drag-and-drop form builder
- Configure settings and notifications
- Save and publish your form
use ArtisanPackUI\Forms\Models\Form;
use ArtisanPackUI\Forms\Models\FormField;
// Create a form
$form = Form::create([
'name' => 'Contact Form',
'slug' => 'contact',
'description' => 'A simple contact form',
'is_active' => true,
]);
// Add fields
FormField::create([
'form_id' => $form->id,
'type' => 'text',
'name' => 'name',
'label' => 'Your Name',
'required' => true,
'order' => 1,
]);
FormField::create([
'form_id' => $form->id,
'type' => 'email',
'name' => 'email',
'label' => 'Email Address',
'required' => true,
'order' => 2,
]);
FormField::create([
'form_id' => $form->id,
'type' => 'textarea',
'name' => 'message',
'label' => 'Your Message',
'required' => true,
'order' => 3,
]);Add the form to any Blade view:
<livewire:forms::form-renderer slug="contact" />Or by form ID:
<livewire:forms::form-renderer :form-id="1" />Form submissions are automatically stored in the database. You can:
-
View in Admin: Navigate to
/admin/forms/{form}/submissions -
Listen for Events: Subscribe to the
FormSubmittedevent - Configure Notifications: Set up email notifications in the form settings
use ArtisanPackUI\Forms\Events\FormSubmitted;
class SendSlackNotification
{
public function handle(FormSubmitted $event): void
{
$form = $event->form;
$submission = $event->submission;
// Send to Slack, log, or perform other actions
}
}- Installation Details - Complete installation guide
- Form Builder - Learn about the form builder interface
- Configuration - Customize package behavior
- Notifications - Set up email notifications