PHPackages                             unusualdope/banner-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. unusualdope/banner-manager

ActiveLibrary[Admin Panels](/categories/admin)

unusualdope/banner-manager
==========================

A Laravel package for managing banners with Blade directives, Flux UI admin interface, and optional translations

05PHP

Since Feb 26Pushed 2mo agoCompare

[ Source](https://github.com/geimsdin/udcommerce-banners)[ Packagist](https://packagist.org/packages/unusualdope/banner-manager)[ RSS](/packages/unusualdope-banner-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Unusualdope Banner Manager
==========================

[](#unusualdope-banner-manager)

A Laravel package for managing banners with Blade directives, Flux UI admin interface, and optional multi-language support.

Features
--------

[](#features)

- **Flux UI Integration**: Modern, responsive admin interface using Flux components.
- **Group Management**: Organize banners into logical groups (e.g., Homepage Hero, Sidebar).
- **Flexible Content**: Manage images, titles, descriptions, links, and buttons.
- **Optional Translations**: Toggle between single-language and multi-language banners per banner.
- **Smart Carousel**: Default view automatically creates an auto-playing carousel for multiple banners.
- **Caching**: Optimized performance with automatic cache management.

Installation
------------

[](#installation)

The package is installed via local path repository in this project.

Database Setup
--------------

[](#database-setup)

Run the migrations:

```
php artisan migrate
```

Or publish the migrations first:

```
php artisan vendor:publish --tag=banner-manager-migrations
php artisan migrate
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=banner-manager-config
```

This will create `config/banner-manager.php` where you can configure:

- `supported_locales`: List of languages (e.g., `['it', 'en']`)
- `default_locale`: Fallback language
- `admin_route_prefix`: URL prefix for admin routes (default: `admin`)
- `default_view`: Template for `@cmsbanner` directive

Usage
-----

[](#usage)

### Admin Interface

[](#admin-interface)

Access the banner manager at: `/admin/banner-manager`

#### Managing Groups

[](#managing-groups)

1. **Create Group**: Click "Create Group" on the index page.
2. **Edit Group**: Click "Manage" on any group card. This takes you to the group edit page where you can also manage its banners.

#### Managing Banners

[](#managing-banners)

Banners are managed directly from their parent group's edit page.

1. Go to a group's edit page.
2. Scroll to the "Banners" section.
3. **Add Banner**: Click the "+" button to open the banner creation page.
4. **Edit Banner**: Click the pencil icon on any banner in the list.
5. **Translations**: Toggle "Enable translations" to switch between single-language and multi-language mode.
6. **Sort Order**: Banners are displayed based on the "Sort Order" field (lower numbers first).

### Displaying Banners

[](#displaying-banners)

Use the `@cmsbanner` Blade directive in your views:

#### 1. Default View (Carousel)

[](#1-default-view-carousel)

Displays banners using the default package view. If multiple banners exist in the group, it automatically renders an auto-playing carousel with slide transitions.

```
@cmsbanner('homepage-hero')
```

#### 2. Custom View

[](#2-custom-view)

Pass a custom view path to render banners with your own HTML structure.

```
@cmsbanner('homepage-hero', ['view' => 'front.banner-manager.hero'])
```

#### 3. Custom CSS Class

[](#3-custom-css-class)

Add custom classes to the banner container.

```
@cmsbanner('sidebar-ads', ['class' => 'my-8 rounded-xl'])
```

### Programmatic Usage

[](#programmatic-usage)

You can use the `BannerService` to retrieve banners directly in your controllers or PHP code:

```
use Unusualdope\BannerManager\Services\BannerService;

$service = app(BannerService::class);

// Get all banners for a group
$banners = $service->getBanners('homepage-hero');

// Get banners for a specific locale
$banners = $service->getBanners('homepage-hero', 'en');

// Clear cache for a group
$service->clearCache('homepage-hero');
```

Database Structure
------------------

[](#database-structure)

### banner\_groups

[](#banner_groups)

- `id`, `name`, `slug`, `description`, `is_active`, `timestamps`

### banners

[](#banners)

- `id`, `banner_group_id`
- `sort_order`, `is_active`
- `start_date`, `end_date`
- `is_translatable` (boolean)
- `timestamps`

### banner\_translations

[](#banner_translations)

- `id`, `banner_id`, `locale`
- `title`, `description`
- `image`, `link_url`
- `button_text`, `alt_text`
- `additional_data` (JSON)
- `timestamps`

Publishing Views
----------------

[](#publishing-views)

To customize the default views:

```
php artisan vendor:publish --tag=banner-manager-views
```

This publishes views to `resources/views/front/banner-manager/`.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance57

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5653ff5432abd53feee2b3ff11fe02098b9d6fe9175ea66296325d6d5b529244?d=identicon)[geimsdin](/maintainers/geimsdin)

---

Top Contributors

[![muh-hidayaat](https://avatars.githubusercontent.com/u/115838871?v=4)](https://github.com/muh-hidayaat "muh-hidayaat (1 commits)")[![rozindzakwan](https://avatars.githubusercontent.com/u/108184265?v=4)](https://github.com/rozindzakwan "rozindzakwan (1 commits)")

### Embed Badge

![Health badge](/badges/unusualdope-banner-manager/health.svg)

```
[![Health](https://phpackages.com/badges/unusualdope-banner-manager/health.svg)](https://phpackages.com/packages/unusualdope-banner-manager)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k4.8M43](/packages/jeroennoten-laravel-adminlte)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[dwij/laraadmin

LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like CRUD Generation, Module Manager, Media, Menus, Backups and much more

1.6k68.7k](/packages/dwij-laraadmin)[filament/spatie-laravel-media-library-plugin

Filament support for `spatie/laravel-medialibrary`.

1764.8M125](/packages/filament-spatie-laravel-media-library-plugin)[bezhansalleh/filament-exceptions

A Simple &amp; Beautiful Pluggable Exception Viewer for FilamentPHP's Admin Panel

193195.9k13](/packages/bezhansalleh-filament-exceptions)[filament/infolists

Easily add beautiful read-only infolists to any Livewire component.

1220.8M36](/packages/filament-infolists)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
