PHPackages                             ludwigheymbeeck/laravel-advert - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ludwigheymbeeck/laravel-advert

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ludwigheymbeeck/laravel-advert
==============================

Advertising helper for laravel - based on adumskis/laravel-advert

1541PHP

Since Mar 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ludwigheymbeeck/laravel-advert)[ Packagist](https://packagist.org/packages/ludwigheymbeeck/laravel-advert)[ RSS](/packages/ludwigheymbeeck-laravel-advert/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Advert
==============

[](#laravel-advert)

Simple package that helps add advert to Laravel 5 websites. What is more it allows to see every advert clicks and views count for some statistics.

CHANGES
-------

[](#changes)

changed in order to facilitate multi-to-multi ads for eyesmart by PlanetVA

### Installation

[](#installation)

First require package with composer:

```
$ composer require ludwigheymbeeck/laravel-advert dev-master
```

Then add service provider to config/app.php:

```
'providers' => [
    ...
    Adumskis\LaravelAdvert\AdvertServiceProvider::class,
],
```

Facede to aliases:

```
'aliases' => [
    ...
    'AdvMng'    => Adumskis\LaravelAdvert\AdvertFacade::class,
],
```

And last is to publish config, migrations and view:

```
$ php artisan vendor:publish
$ php artisan migrate
```

### AdvertCategory model

[](#advertcategory-model)

Simple Eloquent model with variables:

- type - (string) used for getting advert in specific category
- width - (int) size in pixel to resize advert
- height - (int) same as width

If width or height is set to 0 then advert image will be resized with \[aspectRatio\]\[1\] method.

### Advert model

[](#advert-model)

Eloquent model, variables:

- alt - (string) ![]() alt parrameter tag
- url - (string) url address where advert should redirect on click
- image\_url - (string) url addres of advert image
- image\_path - (string) path to image (from base path)
- views - (int) count of views
- clicks - (int) count of clicks
- active - (bool) advert state
- advert\_category\_id - (int) advert category model id
- viewed\_at - (timestamp) datetime of last advert view

Advert model has make method that helps to create new record in database also handles image resize and storing stuff. Method requires array with advert variables values and UploadedFile object. Simple example:

```
Advert::make(
    $request->only(['alt', 'url', 'active']),
    $request->file('image')
);
```

It will return Advert object

### Usage in view

[](#usage-in-view)

```
    {{ AdvMng::getHTML('type')
```

It will take the that with lowest viewed\_at parameter. getHTML method allow add second (bool) parameter and if it's true then it will not check if advert was already taken.

```
    {{ AdvMng::getHTML('type', true)
```

### ToDo

[](#todo)

- Add limit to advert views/clicks

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.3% 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://avatars.githubusercontent.com/u/6242802?v=4)[ludwigheymbeeck](/maintainers/ludwigheymbeeck)[@ludwigheymbeeck](https://github.com/ludwigheymbeeck)

---

Top Contributors

[![ludwigheymbeeck](https://avatars.githubusercontent.com/u/6242802?v=4)](https://github.com/ludwigheymbeeck "ludwigheymbeeck (27 commits)")[![adumskis](https://avatars.githubusercontent.com/u/3788530?v=4)](https://github.com/adumskis "adumskis (15 commits)")

### Embed Badge

![Health badge](/badges/ludwigheymbeeck-laravel-advert/health.svg)

```
[![Health](https://phpackages.com/badges/ludwigheymbeeck-laravel-advert/health.svg)](https://phpackages.com/packages/ludwigheymbeeck-laravel-advert)
```

###  Alternatives

[libern/qr-code-reader

Simple PHP QR Code Reader / Decoder

96241.0k3](/packages/libern-qr-code-reader)[mcred/detect-credit-card-type

Utility to determine credit card type by PAN

16686.4k1](/packages/mcred-detect-credit-card-type)[rych/random

Random data generator for PHP

14450.6k9](/packages/rych-random)[olifanton/interop

Olifanton interop library

1076.0k3](/packages/olifanton-interop)[nebkam/symfony-traits

Helper trait to ease writing APIs in Symfony

157.3k](/packages/nebkam-symfony-traits)

PHPackages © 2026

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