PHP code example of daikazu / laravel-glider

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

    

daikazu / laravel-glider example snippets


'source'             => resource_path(),
'source_path_prefix' => 'assets',


'watermarks'             => resource_path(),
'watermarks_path_prefix' => 'assets/watermarks',


// Array syntax
{{ Glider::url('image.jpg', ['w' => 300, 'h' => 300, 'fit' => 'crop']) }}

// String syntax
{{ Glider::url('image.jpg', 'w=300&h=300&fit=crop') }}

or

{{ Glider::url('image.jpg?w=300&h=300&fit=crop') }}



<x-glider-img src="image.jpg?w=300&h=300&fit=crop" width="300" height="300" >

<x-glider-picture src="image.jpg?w=300&h=300&fit=crop" width="300" height="300" >

regexp
{{ Glider::backgroundClass('bg-class', 'image.jpg') }}
bash
php artisan vendor:publish --provider="Daikazu\LaravelGlider\LaravelGliderServiceProvider" --tag="glider-config"

bash
php artisan glider:clear