Download the PHP package aldeebhasan/lottie-laravel without Composer
On this page you can find all versions of the php package aldeebhasan/lottie-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aldeebhasan/lottie-laravel
More information about aldeebhasan/lottie-laravel
Files in aldeebhasan/lottie-laravel
Package lottie-laravel
Short Description This package will allow you to manage and preview lottiefiles in your laravel project
License MIT
Informations about the package lottie-laravel
Laravel Lottie Library
A php package allow you to load lottie files to your blade directly or after making some updates.
Installation
Install using composer:
A new cache capabilities added to the package, you can enable it by using the following keys to your env file:
you can publish the config file using the following command:
Basic Usage
Lottie file component
You can use the lottie file component directly within your blade as following
All the attributes are optional. Anyway, either
path
or animationData
should be specified in order to
display the lottie.
Lottie files manager
The package also provide a manager to manage the lottie files and make updates over them(like changing the colors)
You can load the lottie file from remote url or pass the file content directly. Check the following
After loading the lottie file to the manager you can change the colors using one of the following
The function replaceColor
also accept rgb
and rgba
color encoding:
To retrieve the updated lottie data you can use our export
function:
Finally, thanks for the lottie-web package author, without their lottie player, we were not able to complete this work.
You can directly get an instance from the lottie manager using our helper function lottie()
Direct Rendering
now you can render the desired lottie file directly in your blade files. Only you need to provide the lottie file data or path, and you will get your view back.
Examples
-
Loading lottie file directly in the blade:
- Loading lottie file using the manager and pass it to the lottie component:
|
License
Laravel Lottie Library package is licensed under The MIT License (MIT).
Security contact information
To report a security vulnerability, contact directly to the developer contact email Here.
All versions of lottie-laravel with dependencies
ext-json Version *