Download the PHP package faisalahsan/laraalerts without Composer
On this page you can find all versions of the php package faisalahsan/laraalerts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download faisalahsan/laraalerts
More information about faisalahsan/laraalerts
Files in faisalahsan/laraalerts
Informations about the package laraalerts
LaraAlerts
A laravel alerts utility that help you show Toasts
directly in your blade template instead of Javascript files.
Installation
Follow below steps
Step :- 1
- Run
composer require faisalahsan/laraalerts
in your terminal
Step :- 2
-
Add Service Provider Open
config/app.php
and addFaisalAhsan\LaraAlerts\LaraAlertServiceProvider::class
to the end ofproviders
array: -
Register Facade
- Run below command
Step :- 3
- Include files in your layout
How to use
-
In you
blade template
Toast Types
info('heading', 'message text')
warning('heading', 'message text')
error('heading', 'message text')
success('heading', 'message text')
Animation
fade() for fade transitions
slide() for slide up and down transitions
plain() simple show from and hide to corner transition
Other Handy Functions
showCloseButton(true) Pass boolean (
true
orfalse
) to show or hide cross button on toast, by default it is truehideAfter(3000) Specify the duration, for how long toast will be visile or pass
false
to make it stickyHide after 3 seconds {{ Toast::info('Duration', 'This toast will be disappear after 3 seconds')->hideAfter(3000)->run() }}
Sticky {{ Toast::info('Duration', 'This toast is a sticky toast.')->hideAfter(false)->run() }}
noOfToastToShow(1) how many toasts can be displayed in stack
position() where toast will be displyed
textAlign() define text alignment e.g. left, right, center
loader('#9EC600' ) show loader with color value
Thanks
Special thanks to Kamran Ahmed
How to Contribute
- Feel free to add some new functionality, improve some existing functionality etc and open up a pull request explaining what you did.
- Report any issues in the issues section
- Also you can reach me directly at [email protected] with any feedback