PHP code example of xunextw / laravel-imgix

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

    

xunextw / laravel-imgix example snippets

 php
'providers' => [
    ...
    Nasyrov\Laravel\Imgix\ImgixServiceProvider::class,
    ...
]
 php
'aliases' => [
    ...
    'Imgix' =>  Nasyrov\Laravel\Imgix\Facades\Imgix::class,
    ...
]
 bash
php artisan vendor:publish --tag=imgix
 php
echo Imgix::createUrl('test.jpg', ['w' => 100, 'h' => 100]);

// Prints out:
// http://test.imgix.net/test.jpg?w=100&h=100
 php
echo imgix('test.jpg', ['w' => 100, 'h' => 100]);

// Prints out:
// http://test.imgix.net/test.jpg?w=100&h=100