# Packages

# Development

# Authentication

# Laravel Breeze

# Installation

composer require laravel/breeze --dev

php artisan migrate

php artisan breeze:install

npm install
npm run dev
php artisan migrate

# Permissions

# Charts

# Media

# Flash Alerts Notifications

# Installation

composer require spatie/laravel-flash

# Usage

class MyController
{
    public function store()
    {
        // …

        flash('My message');

        return back();
    }
}
@if(flash()->message)
    <div>
        {{ flash()->message }}
    </div>
@endif

# Add Service Provider

php artisan make:provider FlashServiceProvider
// FlashServiceProvider

public function boot()
{
	Flash::levels([
		'success' => 'alert-success',
		'warning' => 'alert-warning',
		'error' => 'alert-error',
	]);
}
// View

@if (flash()->message)
    <div class="{{ flash()->class }}">
        {{ flash()->message }}
    </div>

    @if(flash()->level === 'error')
        This was an error.
    @endif
@endif

# Others

Last Updated: 2/5/2023, 11:18:27