PHP code example of nf / slider

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

    

nf / slider example snippets


  'providers'  => [
        // .... Others providers 
        \NF\Slider\SliderServiceProvider::class
    ],

use NF\Slider\Abstracts\Size;
use NF\Slider\Abstracts\SliderType;
use NF\Slider\Facades\SliderManager;

SliderManager::add([
    'name'    => 'Slider Homepage',
    'type'    => SliderType::SLICK,
    'style'   => 'style-1',
    'size'    => Size::SIZE_3X1,
    'fields'  => [
        [
            'label'       => 'Slider',
            'name'        => 'slider',
            'type'        => Input::GALLERY,
            'description' => 'Gallery with meta field, for now we support text and textarea on meta field.',
        ],
    ],
    'options' => [
        'slidesToShow'   => 1,
        'slidesToScroll' => 1,
        'autoplay'       => true,
        'pauseOnHover'   => true,
        'infinite'       => true,
        'dots'           => true,
    ],
]);

[nf-slider name="{slider name}"]

[nf-slider name="Banner homepage"]

do_shortcode("[nf-slider name='Banner homepage']")