marshmallow/nova-formbuilder

Build wizards, forms & more for Laravel using Laravel Nova & TALL stack

dev-main 2023-07-03 05:42 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require marshmallow/nova-formbuilder

Install with

php artisan nova-formbuilder:install

You can publish and run the migrations with:

php artisan vendor:publish --tag="nova-formbuilder-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="nova-formbuilder-config"

Add alpine & livewire & add this after loading scripts:

@include('nova-formbuilder::alpine-tooltip')

This is the contents of the published config file:

return [
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="nova-formbuilder-views"
php artisan vendor:publish --provider="Marshmallow\NovaFormbuilder\FormComponentsServiceProvider" --tag="marshmallow-views"

Add it to NovaServiceProvider.php

MenuSection::make(__('Forms'), [
    MenuItem::resource(\Marshmallow\NovaFormbuilder\Nova\Form::class),
    MenuItem::resource(\Marshmallow\NovaFormbuilder\Nova\Step::class),
    MenuItem::resource(\Marshmallow\NovaFormbuilder\Nova\Question::class),
    MenuItem::resource(\Marshmallow\NovaFormbuilder\Nova\QuestionAnswer::class),
    MenuItem::resource(\Marshmallow\NovaFormbuilder\Nova\QuestionAnswerOption::class),
])->icon('clipboard-list')->collapsable(),

Usage

<livewire:mm-forms-form :form_id="$form_id" />

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

TODO

[] set configs & explanation for external packages like: Livewire, Alpine, Spatie Media, laravel-honeypot & sortable [] remove media lib pro (make custom extension) [] Add translations [] add or remove Flex layouts ??? [] Add custom fields [] add JS & Css [] remove Ray calls (only in debug) [] add Tooltip alpineJs

// EXTRA [] Create submissable form model like the org Notifiable [] convert to formsubmit response [] Set models in config [] Set Livewire traits to implements [] Remove nova restrictions per resource (authorizedToDelete etc.) [] Make nova resources extendable