Download the PHP package codemastersolucoes/flash-materialize without Composer
On this page you can find all versions of the php package codemastersolucoes/flash-materialize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codemastersolucoes/flash-materialize
More information about codemastersolucoes/flash-materialize
Files in codemastersolucoes/flash-materialize
Package flash-materialize
Short Description Easy flash notifications with Materialize-CSS
License MIT
Informations about the package flash-materialize
Easy Flash Messages for Your Laravel App with Materialize-CSS
This project is a fork of the original project.
This composer package offers a Google Materialize-CSS optimized flash messaging setup for your Laravel applications.
Installation
Begin by pulling in the package through Composer.
Next, if using Laravel 5, include the service provider within your config/app.php
file.
After publishes, a configuration file is created in the config folder.
Config colors of flash messages
Config path of view
Finally, as noted above, the default CSS classes for your flash message are optimized for Google Materialize-CSS. As such, pull in the Materialize-CSS, Materialize-JS and jQuery plugin within your HTML or layout file.
IMPORTANT!!! jQuery plugin should come before the Materialize-JS plugin!
Usage
Within your controllers, before you perform a redirect, make a call to the flash()
function.
You may also do:
flash('Message', 30000);
orflash()->info('Message Info', 30000);
: Set the flash time to disappear from the screen.
With this message flashed to the session, you may now display it in your view(s). Because flash messages are so common, we provide a template out of the box to get you started. You're free to use - and even modify to your needs - this template how you see fit.
After inserting the jQuery and Materialize-CSS scripts, enter the code below.
Example
If you need to modify the flash message partials, you can run:
The two package views will now be located in the resources/views/vendor/flash-materialize/
directory.
Default:
Assigning time (in milliseconds) for the message to disappear from the screen
Multiple Flash Messages
Need to flash multiple flash messages to the session? No problem.
Done! You'll now see two flash messages upon redirect.