Download the PHP package ez-laravel/flash-messages without Composer
On this page you can find all versions of the php package ez-laravel/flash-messages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ez-laravel/flash-messages
More information about ez-laravel/flash-messages
Files in ez-laravel/flash-messages
Package flash-messages
Short Description Easy flash messages for your Laravel application.
License MIT
Informations about the package flash-messages
EZ Laravel Flash Messages
Package to provide you with an easy way to implement flash messages in your Laravel application.
Installation
Run the following command in your project directory to install the package:
Publish the vue components using the following commands:
This will publish a flash-messages
directory in your resources/js/components
directory.
Make sure these components are (auto) loaded in. I usually make this happen using:
To be able to render the 'important' icon this package makes use of Font Awesome icons so make sure that's loaded if you intend to use the 'important' status
Usage
Use the following blade directive to include the flash messages partial in any view you'd like to display flash messages in
Afterwards you can call the following methods from your controller to flash messages to the session which will be displayed on the next page load.
Flash message partial
If you'd like to customize the flash message partial you can publish it using the following command:
This will publish the partial to the directory.
Customize styling
All styling is defined inside of the vue components you've published.
To do
- [ ] Add an option to automatically hide the flash message after X seconds
Credits
This package was basically copied from laracasts/flash as a practice project. I used to use that package a lot and this one is custom tailored to how I like to use it. So big thank you to laracasts for the code and all lessons provided by their platform.