Download the PHP package tuto1902/infolist-carousel without Composer
On this page you can find all versions of the php package tuto1902/infolist-carousel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tuto1902/infolist-carousel
More information about tuto1902/infolist-carousel
Files in tuto1902/infolist-carousel
Package infolist-carousel
Short Description Infolist Carousel Entry for Filament v3
License MIT
Homepage https://github.com/tuto1902/infolist-carousel
Informations about the package infolist-carousel
Infolist Carousel Entry for Filament v3
Infolist Carousel entry that allows you to add a slide carousel to any of you Filament v3 projects.
Screenshots
Installation
You can install the package via composer:
Add the following lines in the content section of your tailwind.config.js
file
Optionally, you can publish the views using
You can also publish the carousel blade components using
Usage
Simply import the Carousel component and include it in your Infolist schema. The following is an example using a panel builder resource
By default, the slides will display the column value (or the primary key of your model). You can provide your own slide view using:
The view sould be created inside your project's resources/views
folder. Here's an example of a simple square slide with an image background.
In this scenario, the $state
variable points to the value of the slides.file_name
column. If a column value is not provided, the $state
variable will be Model instance. For example, imagine that you have a Carousel
model (and it's corresponding Resource with an infolist page). Inside this model, you have a HasMany
relationship with the Slide
model. Therefore, you can get a list of all carousel slides using the ->slides
property of the Carousel
model class. If you only provide the relationship name to the Carousle::make
method, the $state
variable will be a Slide
model instance. This way, you have access to all the information from Slide
model inside your slide template.
Customization
You can customize the look and feel of your carousel usign the following options.
Loop
The carousel will loop back to the start/end of your slides.
Orientation
Change the orientation of the carousel. You can choose between Verical and Horizontal (default)
Size
Change the size of the carousel frame. You can choose between Small, Medium and Large. Additionally, you can provide any valid TailwindCSS size-*
class as a string
[!IMPORTANT] In order to provide TailwindCSS classes to the
size
function, you'll need to add the following line inside the content section of yourtailwind.config.js
file.
Autoplay & Delay
Slides will navigate automatically using the specified delay (in miliseconds). If no delay is provided, the default will be 4000 (4 seconds)
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of infolist-carousel with dependencies
filament/support Version ^3.2
illuminate/contracts Version ^10.0||^11.0
spatie/laravel-package-tools Version ^1.16
tuto1902/carousel Version *