PHPackages                             yaroslawww/nova-ad-director - 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. yaroslawww/nova-ad-director

ActiveLibrary[Admin Panels](/categories/admin)

yaroslawww/nova-ad-director
===========================

Laravel nova ad manager to display advertise on site.

2.1.0(2y ago)145MITPHPPHP ^8.1

Since Dec 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yaroslawww/nova-ad-director)[ Packagist](https://packagist.org/packages/yaroslawww/nova-ad-director)[ Docs](https://github.com/yaroslawww/nova-ad-director)[ RSS](/packages/yaroslawww-nova-ad-director/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (9)Versions (4)Used By (0)

Laravel nova ad manager
=======================

[](#laravel-nova-ad-manager)

[![Packagist License](https://camo.githubusercontent.com/674eeaa55e4b3376a29edb55bdf2e4414ac7fbf2e10b0da15763edec5edc0496/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7961726f736c617777772f6e6f76612d61642d6469726563746f723f636f6c6f723d253233346463373166)](https://camo.githubusercontent.com/674eeaa55e4b3376a29edb55bdf2e4414ac7fbf2e10b0da15763edec5edc0496/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7961726f736c617777772f6e6f76612d61642d6469726563746f723f636f6c6f723d253233346463373166)[![Packagist Version](https://camo.githubusercontent.com/ba7a9d35040da34251ca72ed95a1405fa116236960de78965388ed77990b0e7f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7961726f736c617777772f6e6f76612d61642d6469726563746f72)](https://packagist.org/packages/yaroslawww/nova-ad-director)[![Total Downloads](https://camo.githubusercontent.com/18cdd18642822969b3163c3ca75cfb1eb8210e84ff5e1110397ca31cab915dec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7961726f736c617777772f6e6f76612d61642d6469726563746f72)](https://packagist.org/packages/yaroslawww/nova-ad-director)[![Build Status](https://camo.githubusercontent.com/c8ee2c164413022db275df87673c8ce79ec366a725af7c4b70a99dd2e09efeaf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f6e6f76612d61642d6469726563746f722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/nova-ad-director/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/ed5e0c8033bee2fb953558767901518ca1703d6d5176091e82e995454c4ff486/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f6e6f76612d61642d6469726563746f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/nova-ad-director/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9d6fe5cedc144bbe7e551d4f6e6c20d913c9fed05d6cf78b25fd5086605c9c93/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f6e6f76612d61642d6469726563746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/nova-ad-director/?branch=master)

Laravel nova ad manager to display advertise on site.

NovaPackageV1V1V4V2Installation
------------

[](#installation)

You can install the package via composer:

```
composer require yaroslawww/nova-ad-director

# optional publish configs
php artisan vendor:publish --provider="NovaAdDirector\ServiceProvider" --tag="config"

# publish translations
php artisan vendor:publish --provider="NovaAdDirector\ServiceProvider" --tag="lang"
```

Usage
-----

[](#usage)

1. Package supports only predefined sizes. That why developer should firstly specify ["global" sizes](https://github.com/yaroslawww/laravel-ad-director#usage)
2. Inherit or add to nova AdConfiguration Resource
3. Inherit or add to auth service provider AdConfigurationPolicy
4. If app uses configuration with "creatable==false" then developer need create new locations manually `php artisan nova-ad-director:ad-config:create  `
5. Then configure ads in your system

```
use NovaAdDirector\Facades\NovaAdDirector;

class FrontpageController extends Controller
{
    public function __invoke()
    {
        NovaAdDirector::prepareAds([
            'header' => NovaAdDirector::fallbackKey('header', 'frontpage'),
            'medium-posts-list' => NovaAdDirector::fallbackKey('medium', 'list', 'frontpage'),
            'footer-v2' => NovaAdDirector::fallbackKey('footer', 'frontpage'),
        ]);

        return view('frontpage');
    }
}
```

### Key fallback search flow

[](#key-fallback-search-flow)

In multiple situation good to have possibility to use same ad for multiple pages but with some specific ad on specific page, etc. Solution is using fallback flow:

Each key can be computed form multiple nested pointers and system will try to find parent key in case of child is empty.

For example site has multiple pages and multiple posts. That why different pages and posts will search keys like these:

- `header:page:frontpage`
- `header:page:contact-us`
- `header:post:12`
- `header:post:654`

each this keys will search fallbacks:

- `header:page:frontpage` =&gt; `header:page` =&gt; `header`
- `header:page:contact-us` =&gt; `header:page` =&gt; `header`
- `header:post:12` =&gt; `header:post` =&gt; `header`
- `header:post:654` =&gt; `header:post` =&gt; `header`

Administrator in admin can specify only `header` configuration and in any moment add some specific AD item like `header:page:contact-us` to override ad only for contact us page or `header:post` to use specific ad only on posts.

#### Override default fallback separator

[](#override-default-fallback-separator)

```
class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
       \NovaAdDirector\NovaAdDirector::setFallbackKeyConnector('/');
    }
}
```

Credits
-------

[](#credits)

- [![Think Studio](https://camo.githubusercontent.com/8e541bece07d503c85a126b5294865faa00e27371048772f566a0cce8c01fd3a/68747470733a2f2f7961726f736c617777772e6769746875622e696f2f696d616765732f73706f6e736f72732f7061636b616765732f6c6f676f2d7468696e6b2d73747564696f2e706e67)](https://think.studio/)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~292 days

Total

3

Last Release

1062d ago

Major Versions

1.0.0 → 2.0.02022-07-07

PHP version history (2 changes)1.0.0PHP ^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23663794?v=4)[yaroslawww](/maintainers/yaroslawww)[@yaroslawww](https://github.com/yaroslawww)

---

Top Contributors

[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (9 commits)")

---

Tags

laraveladsnova

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yaroslawww-nova-ad-director/health.svg)

```
[![Health](https://phpackages.com/badges/yaroslawww-nova-ad-director/health.svg)](https://phpackages.com/packages/yaroslawww-nova-ad-director)
```

###  Alternatives

[laravel/nova-log-viewer

A Laravel Nova tool for viewing your application logs.

137354.5k1](/packages/laravel-nova-log-viewer)[shuvroroy/nova-dynamic-views

A tool for easier overwriting custom-header and toolbars in Laravel Nova

1032.0k](/packages/shuvroroy-nova-dynamic-views)

PHPackages © 2026

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