koalabs / feedback
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/koalabs/feedback
Requires
- php: >=5.3.0
- illuminate/support: 4.*
This package is not auto-updated.
Last update: 2025-10-11 20:37:11 UTC
README
A very simple library/bundle for creating semantic markup for your feedback messages.
Using Feedback with Laravel
Install
You can install Feedback just as you would install any other Laravel package:
- Require it through Composer. Use:
composer require koalabs/feedback
- Now open
app/config/app.php
and add this new item to yourproviders
array:
Koalabs\Feedback\FeedbackServiceProvider
- Now in the same configuration file add a new item to your aliases array:
'Feedback' => 'Koalabs\Feedback\Facades\Feedback'
That's it.
Usage
You have three basic methods for creating feedback messages:
Feedback::message($text)
, which creates a neutral message.Feedback::error($text)
, which creates an error message.Feedback::success($text)
, which creates a success message.Feedback::update($text)
, which creates an update message.Feedback::field_error($text)
, which creates an inline feedback message. It's good for form validation
Feedback::message($text)
Will output this markup:
<div class="feedback"> <p class="feedback__text">Your text here</p> </div>
Feedback::error($text)
Will output this:
<div class="feedback feedback--error"> <p class="feedback__text">Your text here</p> </div>
Feedback::success($text)
Will output this:
<div class="feedback feedback--success"> <p class="feedback__text">Your text here</p> </div>
Styling the feedback messages
You can style the feedback messages any way you want by using the classes.