PHP code example of oanhnn / laravel-flash-message

1. Go to this page and download the library: Download oanhnn/laravel-flash-message 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/ */

    

oanhnn / laravel-flash-message example snippets


// config/app.php

    'providers' => [
        // Other service providers...

        Laravel\FlashMessage\FlashMessageServiceProvider::class,
    ],
    
    'aliases' => [
        // Other alias classes
        
        'Flash' => Laravel\FlashMessage\Facades\Flash::class,
    ],

public function save()
{
    Flash::success('Save success!')->important();

    return redirect('/home');
}

@