PHPackages                             arrowsgm/amped-laravel - 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. arrowsgm/amped-laravel

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

arrowsgm/amped-laravel
======================

An HTML to AMP converter for Laravel based on amp-wp Wordpress plugin

0.5.0(4y ago)51.4k↓100%2GPL-2.0-or-laterPHPCI failing

Since Feb 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/ArroWsGM/amped-laravel)[ Packagist](https://packagist.org/packages/arrowsgm/amped-laravel)[ RSS](/packages/arrowsgm-amped-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (16)Used By (0)

Amped Laravel
=============

[](#amped-laravel)

This package adds possibility to convert existing html content to amp-html. The package uses [AMP Plugin for WordPress](https://github.com/ampproject/amp-wp) for content sanitizing and some helper functions from [Wordpress](https://github.com/WordPress/WordPress) for amp-wp plugin.

AMP is a fast-growing framework, but unfortunately, currently, there are no (or at least I can't find it) any working solutions, which can help to provide a valid html to amp-html code converter. According to [ampproject/amp-wp#2315](https://github.com/ampproject/amp-wp/issues/2315), @amproject is preparing to release a PHP-library independent from any CMS, but until that time using amp-wp plugin as a content sanitizer is an easiest solution, even if it has many Wordpress-related code. If you have any issue with package sanitizer, you can easily swap it with your own, just making changes in provided config.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3
- Laravel &gt;= 6.x

Update from versions &lt; 0.4.x
-------------------------------

[](#update-from-versions--04x)

You need to change repository url in your composer.json from `https://github.com/ampproject/amp-wp` to `https://github.com/arrowsgm/amp-wp`, this is a hard-forked version 1.4.4 of the `ampproject/amp-wp` package with updated dependencies.

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

[](#installation)

Add to your `composer.json` repositories section link to amp-wp plugin:

```
...
"repositories": [
...
    {
      "type": "vcs",
      "url": "https://github.com/arrowsgm/amp-wp"
    }
  ]
...
```

when require package as usual:

```
composer require arrowsgm/amped-laravel
```

Using
-----

[](#using)

You can publish configuration with artisan command:

```
php artisan vendor:publish --tag=amped-config
```

or just create `amped.php` file in the `config` directory and change required params only.

To convert existing content use provided `Amped` facade:

```
...
use Arrowsgm\Amped\Facades\Amped;
...
class PostController extends Controller
{
    ...
    public function show(Post $post)
    {
        ...
        $amp_content = Amped::convert($post->content);
        ...
    }
    ...
}
```

You can use `Amped` facade in the blade templates, alias already provided:

```
{{ Amped::convert($post->content) }}
```

`Amped` class also have `inlineCss` method to adding custom styles from css file:

```
{!! Amped::inlineCss('amp.css') !!}
```

and you can set base amp styles directory with `amp_custom_css_path` config param.

`isDevParam` method is useful for amp link building. It returns `#development=1` string if laravel application debugging is on:

```
{{ $prev_post->name }}
```

and you can easily navigate through the existing posts with in-browser AMP validation enabled.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.2% 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 ~69 days

Recently: every ~103 days

Total

12

Last Release

1525d ago

### Community

Maintainers

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

---

Top Contributors

[![ArroWsGM](https://avatars.githubusercontent.com/u/9962071?v=4)](https://github.com/ArroWsGM "ArroWsGM (35 commits)")[![c0b41](https://avatars.githubusercontent.com/u/2834954?v=4)](https://github.com/c0b41 "c0b41 (1 commits)")

---

Tags

ampamp-htmlampprojectlaravel

### Embed Badge

![Health badge](/badges/arrowsgm-amped-laravel/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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