PHP code example of community-sdks / unlayer-livewire

1. Go to this page and download the library: Download community-sdks/unlayer-livewire library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

community-sdks / unlayer-livewire example snippets


[
    'html' => '',
    'design' => [],
]

protected function casts(): array
{
    return [
        'content' => 'array',
    ];
}

'routes' => [
    'prefix' => 'unlayer-livewire',
    'middleware' => ['web'],
],

setState(array $state): void
loadDesign(array $design): void
clear(): void
exported(array $state): void
resolveUploadedImage(string $temporaryFilename): string

return [
    'upload' => [
        'disk' => 'public',
        'path' => 'unlayer-livewire',
        'visibility' => 'public',
    ],
];
bash
php artisan unlayer-livewire:install
bash
php artisan vendor:publish --tag=unlayer-livewire-assets --force
bash
php artisan unlayer-livewire:install --config
bash
php artisan unlayer-livewire:install --force
bash
php artisan vendor:publish --tag=unlayer-livewire-assets --force
php artisan vendor:publish --tag=unlayer-livewire-config
blade
<livewire:unlayer-livewire.editor
    :state="$content"
    display-mode="email"
    height="720px"
/>
txt
examples/routes/web.php.stub
examples/views/basic.blade.php
examples/views/templates.blade.php
txt
GET /unlayer-livewire/templates
GET /unlayer-livewire/templates/{template}
bash
php artisan storage:link
bash
php artisan vendor:publish --tag=unlayer-livewire-assets --force