1. Go to this page and download the library: Download ayvazyan10/nova-imagic 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/ */
ayvazyan10 / nova-imagic example snippets
use Ayvazyan10\Imagic\Imagic;
use Laravel\Nova\Http\Requests\NovaRequest;
public function fields(NovaRequest $request): array
{
return [
Imagic::make('Gallery', 'images')
->multiple()
->mediaLibrary()
->maxFiles(12)
->maxFileSize(8 * 1024 * 1024) // Bytes
->liveCrop(aspectRatio: 4 / 3)
->fit(1600, 1200)
->quality(88)
->directory('products'),
];
}