PHP code example of koyanyaroo / laravel-imageable
1. Go to this page and download the library: Download koyanyaroo/laravel-imageable 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/ */
koyanyaroo / laravel-imageable example snippets
use Koyanyaroo\Imageable;
...
/**
* @var string upload directory
*/
protected $uploadDir = '';
/**
* Define an array of filter that allowed to use for this model
* `key` as class name and `value` as field name(s)
*
* @var array
*/
protected $imageableField = [
'image',
'image_hero' => [
'thumb' => [
380, // widht
253, // height
],
],
];