1. Go to this page and download the library: Download wraps/canvas-pointer 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/ */
wraps / canvas-pointer example snippets
use Filament\Panel;
use Wraps\CanvasPointer\CanvasPointerPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
CanvasPointerPlugin::make(),
]);
}
use Wraps\CanvasPointer\Forms\Components\CanvasPointerField;
CanvasPointerField::make('body-points')
->pointRadius(15) // default is 5
->imageUrl('your image source')
->width(800) // pain'),
CanvasPointerField::make('body-points')
->storageDisk(fn () => config('filesystems.default')) // Use the default disk from config
->storageDirectory(function (Get $get) {
// Use a different directory based on the user or other form data
$userId = $get('user_id');
return "users/{$userId}/pointers";
})
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.