endroid/form-bundle
Endroid FormBundle lets you build simple forms via Sonata Admin, store submissions, send notification emails when forms are completed, and export results. Extend behavior with custom event listeners.
First, calibrate expectations: this is not a Laravel package. endroid/form-bundle is a Symfony bundle (its README shows app/AppKernel.php bundle registration, which is pre-Symfony 4 style). composer require endroid/form-bundle will likely resolve in a Laravel project, but nothing will happen: there is no Illuminate\Support\ServiceProvider, no auto-discovery entry, no config/form.php to publish, no migrations. The bundle expects Symfony's Kernel::registerBundles(), a Symfony DI container, and (per the README) Sonata Admin Bundle to actually create forms.
Day-one steps that are actually useful:
composer.json on the repo before installing. Check the symfony/* constraints and minimum PHP version — an archived bundle like this almost certainly caps at an old Symfony/PHP combination that conflicts with a modern Laravel symfony/http-foundation/symfony/console requirement. Use composer require endroid/form-bundle --dry-run to surface conflicts before you commit.If you genuinely need the Symfony functionality, run it as a separate Symfony app (it needs Sonata Admin anyway) and call it from Laravel over HTTP or a shared queue — don't try to boot a Symfony bundle inside Laravel's container.
What the bundle does in its native Symfony habitat (so you know what to mirror):
The Laravel-native translation of that pattern is what you'd actually ship:
forms id, name, slug, schema (json), notify_to, is_active
form_submissions id, form_id, payload (json), ip, created_at
forms table; render fields with a Blade partial that switches on field type (text, email, textarea, select, checkbox).rules() array dynamically from the schema and pass it to a FormRequest-style validator (Validator::make($request->all(), $rules)). This is the piece the Symfony bundle gives you for free and Laravel does not — you must map field config → rules yourself.FormSubmission::create(['form_id' => $form->id, 'payload' => $request->validated()]).Notification::route('mail', $form->notify_to)->notify(new FormSubmitted($submission)) — this maps directly onto the bundle's "send notifications when a form is filled in".response()->streamDownload() or maatwebsite/excel. The bundle's export feature is a weekend of work in Laravel, not a reason to install a Symfony bundle.forms with a JSON/repeater field for the schema; a read-only resource on form_submissions.If you're forced to integrate the bundle anyway (legacy Symfony service you must reuse): keep it isolated. Deploy the Symfony app, expose POST /forms/{slug} and a results endpoint, and consume it from Laravel with Http::post(). Put the base URL in config/services.php and a typed client class in app/Services/. Do not attempt to share the Doctrine entity manager with Eloquent.
composer require succeeds, you'll get classes you can use but no routes, no container bindings, no config. Symptom: "class not found" or "target [SonataAdminBundle] not found" as soon as you touch its services. There is no php artisan vendor:publish equivalent.symfony/* packages. Resolve with --dry-run and read the conflict output carefully; you may need --with-all-dependencies and still lose.bin/console debug:container / debug:router, not php artisan. Don't waste time looking for Artisan commands.DependencyInjection/Configuration.php and the extension class to see what config keys it expects and whether defaults assume Sonata. If it hard-references Sonata admin services, the bundle is unusable without Sonata installed.services.yaml in Symfony) rather than via Laravel-style bindings or events. There is no event dispatcher integration with Laravel's Event facade.How can I help you explore Laravel packages today?