effina / larabanner
A simple banner management system for Laravel
dev-main
2025-02-26 01:55 UTC
Requires
- php: ^8.2
- illuminate/support: ^11.0
Requires (Dev)
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-06-26 02:52:31 UTC
README
A simple, flexible banner management system for Laravel 11+.
Features
- Schedule banners with start and end dates
- Set display days (e.g., weekdays only)
- Soft deletes supported
- Full CRUD interface
- Simple Blade directive for displaying banners
Installation
You can install the package via composer:
composer require effina/larabanner
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="effina\Larabanner\LarabannerServiceProvider" --tag="config"
Run the migrations:
php artisan migrate
Usage
In your Blade templates:
@banner(1) // Displays banner with ID 1 if it's currently active
Managing Banners
Access the banner management interface at /banners
(configurable in config/larabanner.php).
Configuration Options
// config/larabanner.php return [ 'pagination' => 15, // Number of items per page in the admin panel 'route_prefix' => 'banners', // URL prefix for the admin panel 'middleware' => ['web', 'auth'], // Middleware for the admin panel ];
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.