PHP code example of ycs77 / laravel-glide

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

    

ycs77 / laravel-glide example snippets


use Ycs77\LaravelGlide\Facades\Glide;

// Other routes ...

Glide::route();

glide_url('avatar/user01-avatar.png', [
    'w' => '50',
    'h' => '50',
    'fit' => 'crop',
]);

// https://example.test/img/avatar/user01-avatar.png/sds4d524g.../sd2g4e1drf2g...img.jpg?w=50&h=50&fit=crop

use Ycs77\LaravelGlide\Facades\Glide;

Glide::url('avatar/user01-avatar.png', [
    'w' => '50',
    'h' => '50',
    'fit' => 'crop',
]);

// https://example.test/img/avatar/user01-avatar.png/sds4d524g.../sd2g4e1drf2g...img.jpg?w=50&h=50&fit=crop
bash
php artisan vendor:publish --provider="Ycs77\LaravelGlide\GlideServiceProvider"