PHPackages                             cohensive/laravel-amp - 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. cohensive/laravel-amp

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

cohensive/laravel-amp
=====================

Package that helps you set up AMP (Accelerated Mobile Pages) using Laravel

2.8(1y ago)0203MITPHPPHP ^7.3|^8.0|^8.1|^8.2|^8.3|^8.4

Since Jan 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/KaneCohen/laravel-amp)[ Packagist](https://packagist.org/packages/cohensive/laravel-amp)[ Docs](https://github.com/KaneCohen/laravel-amp)[ RSS](/packages/cohensive-laravel-amp/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (15)Used By (0)

Lavavel AMP (Accelerated Mobile Pages)
======================================

[](#lavavel-amp-accelerated-mobile-pages)

This package makes it easy to integrate [AMP](https://www.ampproject.org/) in your Laravel projects. By using the new `Route::amp()` notation.

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

[](#installation)

You can install the package via composer:

```
composer require cohensive/laravel-amp
```

Register the service provider in your app.php

```
// app.php
'providers' => [
    ...
    Cohensive\Amp\AmpServiceProvider::class,
],
'aliases' => [
    ...
    'AmpRouter' => Cohensive\Amp\AmpRouteFacade::class,
]
```

And register the custom `Route::amp()` notation in your `RouteServiceProvider.php`.

```
/// app/Providers/RouteServiceProvider.php
use AmpRouter;

...
public function boot(Router $router)
{
    AmpRouter::registerMacros();

    parent::boot($router);
}
```

Usage
-----

[](#usage)

```
//route.php
Route::amp('url-of-my-route', ['as' => 'my-route', 'uses' => 'PageController@text']);
```

There well be two routes registered. One with '/url-of-my-route', and one prefixed with the config value you specify in the config file such as `amp`: 'amp/url-of-my-route'.

The logic for both routes is the same, but the view that's being rendered for the amp route affixed the the config value you specify in the config file (view\_affix).

In your view, include the `amp::tag` file. This will match the AMP route (if exists) and put an link to the amp content in your HTML.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance46

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 62.5% 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 ~248 days

Recently: every ~160 days

Total

13

Last Release

417d ago

Major Versions

1.1.2 → 2.02022-02-07

PHP version history (6 changes)1.0PHP &gt;=5.6

2.0PHP ^8.0

2.3PHP ^7.3|^8.0

2.5PHP ^7.3|^8.0|^8.1

2.6PHP ^7.3|^8.0|^8.1|^8.2|^8.3

2.8PHP ^7.3|^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/578455?v=4)[Kane Cohen](/maintainers/KaneCohen)[@KaneCohen](https://github.com/KaneCohen)

---

Top Contributors

[![KaneCohen](https://avatars.githubusercontent.com/u/578455?v=4)](https://github.com/KaneCohen "KaneCohen (15 commits)")[![JulianaGaibler](https://avatars.githubusercontent.com/u/16828024?v=4)](https://github.com/JulianaGaibler "JulianaGaibler (3 commits)")[![JulianGaibler](https://avatars.githubusercontent.com/u/16828024?v=4)](https://github.com/JulianGaibler "JulianGaibler (3 commits)")[![ceesvanegmond](https://avatars.githubusercontent.com/u/883497?v=4)](https://github.com/ceesvanegmond "ceesvanegmond (2 commits)")[![haakym](https://avatars.githubusercontent.com/u/832687?v=4)](https://github.com/haakym "haakym (1 commits)")

---

Tags

wearejustlaravel-ampcohensive

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cohensive-laravel-amp/health.svg)

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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