PHP code example of tuto1902 / infolist-carousel

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

    

tuto1902 / infolist-carousel example snippets


use Tuto1902\InfolistCarousel\Infolists\Components\Carousel;
use Filament\Infolists\Infolist;

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist
        ->schema([
            Carousel::make('slides.file_name')
        ]);
}


public static function infolist(Infolist $infolist): Infolist
{
    return $infolist
        ->schema([
            Carousel::make('slides.file_name')
                ->slideView('my-slide-template')
        ]);
}

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist
        ->schema([
            Carousel::make('slides')
                ->slideView('my-slide-template')
        ]);
}

    Carousel::make('slides.file_name')
        ->loop()

    use Tuto1902\InfolistCarousel\Infolists\Components\Carousel\CarouselOrientation;

    Carousel::make('slides.file_name')
        ->orientation(CarouselOrientation::Vertical)

    use Tuto1902\InfolistCarousel\Infolists\Components\Carousel\CarouselSize;

    Carousel::make('slides.file_name')
        ->size(CarouselSize::Large)
        // or
        ->size('size-96')

    Carousel::make('slides.file_name')
        ->autoplay()
        ->delay(2000)
js
export default {
  presets: [preset],
  content: [
+    './vendor/tuto1902/carousel/resources/**/*.blade.php',
+    './vendor/tuto1902/infolist-carousel/resources/**/*.blade.php',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
bash
php artisan vendor:publish --tag="infolist-carousel-views"
bash
php artisan vendor:publish --tag="carousel-views"
js
export default {
  presets: [preset],
  content: [
    './vendor/tuto1902/carousel/resources/**/*.blade.php',
    './vendor/tuto1902/infolist-carousel/resources/**/*.blade.php',
+    './vendor/tuto1902/infolist-carousel/src/Infolists/Components/**/*.php',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}