PHP code example of fromjun / laravel-imageresizer-sdk

1. Go to this page and download the library: Download fromjun/laravel-imageresizer-sdk 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/ */

    

fromjun / laravel-imageresizer-sdk example snippets


use ImageResizer;

ImageResizer::ping(); // Check connection
ImageResizer::upload('/path/to/image.jpg');

use M1n64\ImageResizer\Client;

public function __construct(protected Client $client) {}

public function store()
{
    $response = $this->client->upload($filePath);
}
bash
php artisan vendor:publish --tag=config