effina/larabanner
最新稳定版本:1.0.2
Composer 安装命令:
composer require effina/larabanner
包简介
A simple banner management system for Laravel
README 文档
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.
统计信息
- 总下载量: 256
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-04