This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
You can install the package via composer:
composer require muhammadkazimsadiq/filament-canvasImportant
If you have not set up a custom theme and are using Filament Panels follow the instructions in the Filament Docs first.
After setting up a custom theme add the plugin's views to your theme css file or your app's css file if using the standalone packages.
@source '../../../../vendor/muhammadkazimsadiq/filament-canvas/resources/**/*.blade.php';You can install and set up the package with our automated command. This will publish the config file, publish the migrations, and ask if you want to run the migrations:
php artisan filament-canvas:installThis is the contents of the published config file:
return [
/*
|--------------------------------------------------------------------------
| Autosave Interval
|--------------------------------------------------------------------------
|
| Interval in seconds for TLDraw canvas autosave. Set to 0 to disable.
|
*/
'autosave_interval' => 10,
/*
|--------------------------------------------------------------------------
| Max Payload Size
|--------------------------------------------------------------------------
|
| Maximum size in KB for a drawing JSON payload. Default: 5 MB.
|
*/
'max_payload_size' => 5120,
/*
|--------------------------------------------------------------------------
| Drawing Model
|--------------------------------------------------------------------------
|
| The model class used for drawings. You may override this if you extend
| the default Drawing model.
|
*/
'drawing_model' => \MuhammadKazimSadiq\FilamentCanvas\Models\Drawing::class,
];use MuhammadKazimSadiq\FilamentCanvas\FilamentCanvasPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
FilamentCanvasPlugin::make(),
]);
}This plugin ships with the TLDraw React editor pre-bundled. You do not need to install npm dependencies or use Vite in your host application.
The assets are automatically loaded by Filament. However, if you are developing locally and notice the editor isn't loading or updating, ensure you publish the latest assets:
php artisan filament:assetscomposer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.