PHP code example of binkap / laraflash

1. Go to this page and download the library: Download binkap/laraflash library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

binkap / laraflash example snippets


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 */

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 */

use Binkap\Laraflash\Laraflash;

Laraflash::message('Provide a valid message')
->warning()
->livewire($component); /* Call the livewire method to flash the message with livewire */

// MODE methods

$flash->success()  // For success
$flash->warning()  // For warnings
$flash->danger() // For errors
js
export default {
    content: [
        "./vendor/binkap/laraflash/src/views/**/*.blade.php",
    ],
}