PHP code example of anish / resizable-modal

1. Go to this page and download the library: Download anish/resizable-modal 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/ */

    

anish / resizable-modal example snippets


use Anish\ResizableModal\ResizableModalPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            ResizableModalPlugin::make(),
        ]);
}

// config/resizable-modal.php
return [
    'enabled' => true,
    'register_on_actions' => true,
    'persist_in_local_storage' => true,
    'local_storage_prefix' => 'filament.resizable-modal',
];

ResizableModalPlugin::make()
    ->enabled(fn (): bool => true)
    ->registerOnActions(true)
    ->persistInLocalStorage(true)
    ->localStoragePrefix('my-app.resizable-modal')
    ->resizableWidths(['sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl']);

// app/Providers/AppServiceProvider.php
use Anish\ResizableModal\ResizableModalPlugin;

public function boot(): void
{
    ResizableModalPlugin::standalone()
        ->persistInLocalStorage(true);
}

// config/resizable-modal.php
'register_on_actions' => false,

// On a specific action:
use Anish\ResizableModal\Support\ResizableModal;

Action::make('edit')
    ->extraModalWindowAttributes(ResizableModal::extraAttributes(), merge: true);
bash
php artisan vendor:publish --tag=resizable-modal-config