ArtisanPack UI
DocsFormsInstallation Overview

Installation Overview

Forms v1.6.0

This guide walks you through installing and setting up ArtisanPack UI Forms in your Laravel application. Publish the configuration file, migrations, and...

This guide walks you through installing and setting up ArtisanPack UI Forms in your Laravel application.

Step 1: Install via Composer

composer require artisanpack-ui/forms

Step 2: Publish Assets

Publish the configuration file, migrations, and views:

# Publish everything
php artisan vendor:publish --provider="ArtisanPackUI\Forms\FormsServiceProvider"

# Or publish specific assets
php artisan vendor:publish --tag=forms-config
php artisan vendor:publish --tag=forms-views

The package loads its own migrations automatically, so there is nothing to publish for them — running php artisan migrate below is all that is needed.

Step 3: Run Migrations

php artisan migrate

This creates the following database tables:

Table Description
forms Stores form definitions and settings
form_steps Stores multi-step form step definitions
form_fields Stores field configurations for each form
form_submissions Stores form submission records
form_submission_values Stores individual field values per submission
form_uploads Stores file upload metadata
form_notifications Stores email notification configurations

Step 4: Configure Storage Disk

The package creates a form-uploads disk for storing file uploads. If you need to customize this, add the following to your config/filesystems.php:

'disks' => [
    // ... other disks

    'form-uploads' => [
        'driver' => 'local',
        'root' => storage_path('app/form-uploads'),
        'visibility' => 'private',
    ],
],

Step 5: Configure Environment (Optional)

Add these environment variables to your .env file to customize package behavior:

# Admin interface
FORMS_ADMIN_PREFIX=admin/forms

# File uploads
FORMS_UPLOADS_DISK=form-uploads
FORMS_UPLOADS_DIRECTORY=uploads
FORMS_UPLOADS_MAX_SIZE=10240

# Submissions
FORMS_RETENTION_DAYS=

# Notifications
FORMS_FROM_NAME=
FORMS_FROM_EMAIL=
FORMS_NOTIFICATION_QUEUE=default
FORMS_SHOW_IP_IN_EMAILS=true

# Webhooks
FORMS_WEBHOOKS_ENABLED=false
FORMS_WEBHOOK_URL=
FORMS_WEBHOOK_SECRET=
FORMS_WEBHOOK_QUEUE=default
FORMS_WEBHOOK_TIMEOUT=30

# Privacy
FORMS_INCLUDE_IP=true
FORMS_ANONYMIZE_IP=false
FORMS_INCLUDE_USER_AGENT=true

# Security
FORMS_SECURITY_LOGGING=true

# Authorization
FORMS_RESTRICT_BY_OWNER=false
FORMS_ALLOW_ADMIN_BYPASS=true
FORMS_USER_MODEL=App\Models\User

For optimal performance, notifications and webhooks are queued. Ensure you have a queue worker running:

php artisan queue:work

Or add it to your process manager (Supervisor, etc.).

Verification

After installation, verify everything is working:

  1. Visit /admin/forms (or your configured prefix) to access the admin interface
  2. Create a test form using the form builder
  3. Submit the form and check submissions

Upgrading to 1.6

  1. Run the migrations. 1.6.0 adds form_submission_values.field_admin_label, redacted_at, is_masked and redact_after_days, and form_uploads.pending_deliveries, media_id and is_masked (the privacy flags are backfilled from the current field settings). Submissions fail until these columns exist:

    php artisan migrate
    
  2. If you published the package views (forms-views), republish them and apply your changes again. 1.5 copies of livewire/form-renderer.blade.php write to hiddenFields, which is now locked, so a form with conditional logic throws CannotUpdateLockedPropertyException. 1.5 copies of components/fields/file.blade.php bind files to the wrong property, so a required file field never passes.

    php artisan vendor:publish --tag=forms-views --force
    php artisan view:clear
    
  3. If you use Redact after (days), schedule forms:prune-submissions (see Field Privacy & Visibility).

  4. Check the stricter validation: URL fields accept only http and https unless Allowed Schemes lists others, date fields accept only YYYY-MM-DD, and paragraph text is now read as HTML with basic formatting.

Troubleshooting

Views Not Publishing

If views don't publish correctly, try:

php artisan vendor:publish --tag=forms-views --force

Migrations Fail

Ensure your database connection is configured correctly and the database exists:

php artisan db:show
php artisan migrate:status

If file uploads aren't accessible, create the storage link:

php artisan storage:link

Next Steps