PHP code example of agenciafmd / admix-banners

1. Go to this page and download the library: Download agenciafmd/admix-banners 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/ */

    

agenciafmd / admix-banners example snippets




return [
    'name' => 'Banners',
    'icon' => 'device-desktop',
    'sort' => 110,
    'locations' => [
        'home' => [
            'files' => [
                'desktop' => [
                    'max' => 4096,
                    'max_width' => 3600,
                    'max_height' => 1700,
                    'crop_config' => [
                        // 'aspectRatio' => round(3600 / 1700, 2),
                    ],
                    'show_meta' => false,
                    'media' => '(min-width: 1400px)',
                ],
                'notebook' => [
                    'max' => 2048,
                    'max_width' => 2080,
                    'max_height' => 1080,
                    'crop_config' => [
                        // 'aspectRatio' => round(2160 / 1660, 2),
                    ],
                    'show_meta' => false,
                    'media' => '(min-width: 768px)',
                ],
                'mobile' => [
                    'max' => 2048,
                    'max_width' => 1360,
                    'max_height' => 2380,
                    'crop_config' => [
                        // 'aspectRatio' => round(1360 / 2380, 2),
                    ],
                    'show_meta' => false,
                    'media' => '(max-width: 767px)',
                ],
            ],
        ],
        'home-destaque' => [...],
    ],
];
bash
php artisan migrate
bash
php artisan vendor:publish --tag=admix-banners:seeders
bash
php artisan vendor:publish --tag=admix-banners:configs