PHP code example of ampedweb / laravel-glide-in-a-box

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

    

ampedweb / laravel-glide-in-a-box example snippets


glide_url($pathToYourImageFile)->preset('medium')->filter('sepia')->url();

// You can also cast the FluentUrlBuilder to a string:

$url = (string)glide_url($pathToYourImageFile)->preset('medium')->filter('sepia'); 

// Or print it:

print glide_url($pathToYourImageFile)->preset('medium')->filter('sepia');

// Or use it directly in your blade templates:

{{ glide_url($pathToYourImageFile)->preset('medium')->filter('sepia') }}

use AmpedWeb\GlideUrl\Interfaces\Filter;

glide_url($pathToYourImageFile)->preset('medium')->filter(Filter::SEPIA)->url();

use AmpedWeb\GlideUrl\Interfaces\Fit;

glide_url($pathToYourImageFile)->size(200,100)->fit(Fit::CROP)->webp(50)->url();

AmpedWeb\GlideInABox\Controller\GlideImageController;
bash
php artisan vendor:publish --tag=glideinabox  
bash
php vendor/bin/phpunit