PHP code example of salahmyn / laravel-image-resize

1. Go to this page and download the library: Download salahmyn/laravel-image-resize 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/ */

    

salahmyn / laravel-image-resize example snippets


Mxmm\ImageResize\ImageResizeServiceProvider::class,
 

'ImageResize' => Mxmm\ImageResize\Facade::class,	

/**
 * @param string|null $path
 * @param int|null $width
 * @param int|null $height
 * @param string $action
 * @return string
 */
public static function url(string $path = null, int $width = null, int $height = null, string $action = 'fit' , $disk = null): string



return [

    /*
    |-----------------------------------------------
    | Default Filesystem Disk
    |-----------------------------------------------
    |
    */
    // ...
    
    'disks' => [
        // ...

        'assets' => [
            'driver' => 'local',
            'root' => public_path('assets'),
        ],
    ];

bash
php artisan vendor:publish --provider="Mxmm\ImageResize\ImageResizeServiceProvider"