PHP code example of devmarketer / laraflash

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

    

devmarketer / laraflash example snippets


php artisan vendor:publish --tag=laraflash

flash('Something went wrong');

flash('Something went wrong', array('title' => 'Oops! ', 'type' => 'danger', 'priority' => 5));
flash('We did it!');
flash('One small problem occurred', ['type' => 'warning']);

@foreach (LaraFlash::notifications as $notification)
	<div class="alert alert-{{ $notification->type }}" role="alert">
		<h4>{{ $notification->title }}</h4>
		<p>{{ $notification->content }}</p>
	</div>
@endforeach