A beautiful and easy-to-use alert notification library for Laravel with Blade integration
wahyudedik/laravel-alert is a Laravel package for a beautiful and easy-to-use alert notification library for laravel with blade integration.
It currently has 0 GitHub stars and 0 downloads on Packagist.
Install it with composer require wahyudedik/laravel-alert.
Discover more Laravel packages by wahyudedik
or browse all Laravel packages to compare alternatives.
Last updated
A comprehensive Laravel package for managing alerts and notifications with support for multiple themes, animations, and real-time updates.
composer require wahyudedik/laravel-alert
Publish the configuration file:
php artisan vendor:publish --provider="Wahyudedik\LaravelAlert\AlertServiceProvider" --tag="laravel-alert-config"
use Wahyudedik\LaravelAlert\Facades\Alert;
// Success alert
Alert::success('Operation completed successfully!');
// Error alert
Alert::error('Something went wrong!');
// Warning alert
Alert::warning('Please check your input.');
// Info alert
Alert::info('Welcome to our application!');
// Custom alert
Alert::add('custom', 'This is a custom alert!');
<!-- Single alert -->
<x-alert type="success" dismissible>
Your changes have been saved!
</x-alert>
<!-- Display all alerts -->
<x-alerts />
<!-- Single alert directive -->
@alert('info', 'Welcome to our application!')
<!-- Display all alerts -->
@alerts
<!-- Conditional alert -->
@alertIf($user->isNew(), 'success', 'Welcome to our platform!')
// config/laravel-alert.php
return [
'default_theme' => 'bootstrap', // bootstrap, tailwind, bulma
'auto_dismiss' => true,
'dismiss_delay' => 5000, // milliseconds
'animation' => 'fade', // fade, slide, bounce, none
'position' => 'top-right', // top-right, top-left, bottom-right, bottom-left, top-center, bottom-center
'max_alerts' => 5,
'session_key' => 'laravel_alerts',
];
<x-alert type="success">Success message</x-alert>
<x-alert type="error">Error message</x-alert>
<x-alert type="warning">Warning message</x-alert>
<x-alert type="info">Info message</x-alert>
<x-alert type="success" class="bg-green-50 text-green-800 border-green-200">
Success message
</x-alert>
Alert::success('Message', 'Title', [
'dismissible' => true,
'icon' => 'fas fa-check',
'class' => 'custom-alert-class',
'style' => 'border-left: 4px solid #28a745;'
]);
You can create custom themes by publishing the views:
php artisan vendor:publish --provider="Wahyudedik\LaravelAlert\AlertServiceProvider" --tag="laravel-alert-views"
MIT License. See LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For comprehensive documentation, visit our documentation site.
docs/
βββ README.md # Main documentation index
βββ installation.md # Installation guide
βββ api.md # API documentation
βββ examples.md # Code examples
βββ contributing.md # Contributing guide
βββ changelog.md # Version history
βββ mkdocs.yml # MkDocs configuration
βββ package.json # Node.js dependencies
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Docker Compose configuration
βββ Makefile # Build automation
βββ .gitignore # Git ignore rules
The documentation is built using MkDocs with the Material theme.
# Navigate to docs directory
cd docs/
# Install dependencies
make install
# Start development server
make dev
# Build documentation
make build
# Deploy to GitHub Pages
make deploy
# Start with Docker
make docker-dev
# Build with Docker
make docker-build
# Deploy with Docker
make docker-deploy
make help # Show all available commands
make dev # Start development server
make build # Build documentation
make deploy # Deploy to GitHub Pages
make clean # Clean build files
make lint # Lint markdown files
make spell # Check spelling
make test # Run tests
make preview # Preview built documentation
# Get all alerts
GET /api/v1/alerts
# Create alert
POST /api/v1/alerts
{
"type": "success",
"message": "Operation completed!",
"title": "Success"
}
# Dismiss alert
POST /api/v1/alerts/{id}/dismiss
# Run tests
composer test
# Run with coverage
composer test-coverage
# Run performance tests
composer test-performance
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Wahyudedik