Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binkaps/laraflash
Laraflash streamlines the process of displaying temporary messages in your Laravel application. Its focus on simplicity and performance makes it an ideal choice for projects of all sizes
https://github.com/binkaps/laraflash
flash laraflash laravel livewire
Last synced: 2 months ago
JSON representation
Laraflash streamlines the process of displaying temporary messages in your Laravel application. Its focus on simplicity and performance makes it an ideal choice for projects of all sizes
- Host: GitHub
- URL: https://github.com/binkaps/laraflash
- Owner: binkapS
- License: mit
- Created: 2023-06-16T18:56:33.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-15T07:27:19.000Z (4 months ago)
- Last Synced: 2024-10-14T07:22:08.968Z (2 months ago)
- Topics: flash, laraflash, laravel, livewire
- Language: Blade
- Homepage: https://binkap.com
- Size: 88.9 KB
- Stars: 18
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Laraflash
Flash Session messages for Laravel and Livewire
## Installation
```bash
composer require binkap/laraflash
```## Add the flash container to your layout
```html
```## Laraflash currently uses Tailwind CSS
```js
export default {
content: [
"./vendor/binkap/laraflash/src/views/**/*.blade.php",
],
}
```## Flashing messages
Choose the method most convenient for you.
## 1: Helper Functions
```php
use function Binkap\Laraflash\flash;flash()->message('Message sent successfully')
->success() // Optional (Uses default when not specified)
->livewire($component); /* Call the livewire method to flash the message with livewire */
```## Or
```php
use function Binkap\Laraflash\alert;alert()->message('Message sent successfully')
->success() // Optional (Uses default when not specified)
->livewire($component); /* Call the livewire method to flash the message with livewire */
```## 2: Facade
```php
use Binkap\Laraflash\Laraflash;Laraflash::message('Provide a valid message')
->warning()
->livewire($component); /* Call the livewire method to flash the message with livewire */
```## All methods
```php
// MODE methods$flash->success() // For success
$flash->warning() // For warnings
$flash->danger() // For errors
```## Rendered messages
Here are example of rendered messages
### DarkMode
### LightMode
See [CHANGELOG](CHANGELOG.md) for Changes