Download the PHP package interaction-design-foundation/nova-unlayer-field without Composer
On this page you can find all versions of the php package interaction-design-foundation/nova-unlayer-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download interaction-design-foundation/nova-unlayer-field
More information about interaction-design-foundation/nova-unlayer-field
Files in interaction-design-foundation/nova-unlayer-field
Package nova-unlayer-field
Short Description A Laravel Nova field for Unlayer to compose emails and landing pages.
License MIT
Informations about the package nova-unlayer-field
Nova Unlayer Field
Adds a Laravel Nova field for Unlayer to compose emails and landing pages.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
⚠️ For PHP 7.1 - PHP 7.4 please use version 0.2.2 (it uses another namespace).
Optional: publish the configuration
Run this on the command line from the root of your project:
Usage
This package assumes that your Model has an attribute to store Unlayer design config JSON string
(it’s better to use json
or jsonb
or longtext
SQL type to store it).
On submit, the package automatically stores Unlayer design config only (JSON string).
Most likely, you also want to do something with the output HTML code, generated by Unlayer.
To access it, please use savingCallback()
method (see an extended example below).
Basic field config:
Options
->config(array|callable $config)
: Specify Unlayer config.->height(string $height)
: Set height of the editor (with units). E.g. '1000px' (800px by default).->savingCallback(?callable $callback)
: Specify a callback to call on before Model saving. Useful to store generated HTML code (to a Model or as a file).
Example of using savingCallback
:
Changelog
Please see Releases for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.