PHP code example of bavix / laravel-helpers
1. Go to this page and download the library: Download bavix/laravel-helpers 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/ */
bavix / laravel-helpers example snippets
$slice = new \Bavix\Slice\Slice([
'disk' => 'public',
'driver' => 'gd'
]);
$corundum = new \Bavix\Helpers\Corundum\Corundum($slice);
$adapter = new \Bavix\Helpers\Corundum\Adapters\Contain(
$corundum,
__DIR__ . '/images/test.png'
);
$slice = new Bavix\Slice\Slice([
'width' => '600',
'height' => '600',
'color' => '#f00'
]);
$adapter->apply($slice)
->save(__DIR__ . '/images/none.png');
use Bavix\Extensions\ModelURL;
class File extends Model
{
use ModelURL;
protected $route = 'file';
// ...
}