Download the PHP package tsfcorp/uifeedback without Composer
On this page you can find all versions of the php package tsfcorp/uifeedback. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tsfcorp/uifeedback
More information about tsfcorp/uifeedback
Files in tsfcorp/uifeedback
Package uifeedback
Short Description Display messages
License MIT
Homepage https://github.com/tsfcop/lister
Informations about the package uifeedback
Display messages library
Makes it easy to give a visual feedback to user
Installation
Require this package in your composer.json
. Run the following command:
After updating composer, the service provider will automatically be registered and enabled, along with the facade, using Auto-Discovery
Next step is to run the artisan command to bring the config into your project
Update config/uifeedback.php
Usage Instructions
This library is build to work by default with Bootstrap 4.
You can add new messages wherever you'd like in you application, like this:
set
method has 3 parameters:
- message format: a string represeinting the class that will be added to the HTML container
- message: a string represeinting the class that will be added to the HTML container
- close button (optional, default: true): whether to display or not the close button for the alert
Message format has the following options, but you can specify there whatever class you'd like and customise the CSS in your app.
Message Format | Value |
---|---|
PRIMARY | primary |
SECONDARY | secondary |
SUCCESS | success |
DANGER | danger |
WARNING | warning |
INFO | info |
LIGHT | light |
DARK | dark |
Convenience methods
You can set a message using the following pattern for supported message formats:
Display messages
In order to display the messages, you can add the following line in your views:
Output messages
If you'd like to display a formatted message right away, you can use the following in your views:
Group messages
If you set multiple messages of the same type (for example SUCCESS), a new alert will be generated for each message.
You can change this behaviour by setting the group_errors
to true
. This way messages of the same type will be displayed in the same alert box.
Session errors
UiFeedback can capture validation errors and display these along with other messages you set. This is the default behaviour.
It can be changed in the config: capture_validation_errors
Change output format
In order to change the format for a message you need to publish the view used:
Then you can edit the published view in: resources/views/vendor
All versions of uifeedback with dependencies
illuminate/support Version ^5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/session Version ^5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0