PHPackages                             lightship-core/lightship-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. lightship-core/lightship-laravel

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

lightship-core/lightship-laravel
================================

Laravel wrapper to use Lightship PHP.

0.4.0(3y ago)311[2 issues](https://github.com/lightship-core/lightship-laravel/issues)MITPHP

Since May 1Pushed 3y ago2 watchersCompare

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

READMEChangelogDependencies (8)Versions (13)Used By (0)

lightship-laravel
=================

[](#lightship-laravel)

Laravel wrapper to use Lightship PHP.

Summary
-------

[](#summary)

- [About](#about)
- [Features](#features)
- [Installation](#installation)
- [Examples](#examples)
- [Tests](#tests)

About
-----

[](#about)

Lightship is a way to get web page audits without using a headless browser.

This package just a wrapper around the PHP implementation of Lightship ().

Features
--------

[](#features)

- Provides a Facade to easily use Lightship PHP

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

[](#installation)

On your terminal, install the package:

```
composer require --dev lightship-core/lightship-laravel
```

Examples
--------

[](#examples)

- [1. Using the facade](#1-using-the-facade)
- [2. Using the comand](#2-using-the-comand)
- [3. Show failed/passed rules when using the command](#3-show-failedpassed-rules-when-using-the-command)

### 1. Using the facade

[](#1-using-the-facade)

In this example, we will generate an array report using the Laravel facade.

```
namespace App\Controllers;

use Lightship\Facades\Lightship;

class HomeController extends Controller
{
  public function index()
  {
    $report = Lightship::route("https://example.com")
      ->analyse()
      ->toArray();

    return view("home.index", [
      "report" => $report,
    ]);
  }
}
```

### 2. Using the comand

[](#2-using-the-comand)

In this example, we will call Lightship from the command.

```
php artisan lightship:run --url https://example.com
```

You can also pass a route name.

```
php artisan lightship:run --route home.index
```

You can even pass multiple routes.

```
php artisan lightship:run --route home.index --route contact-us.index
```

And you can mix both.

```
php artisan lightship:run --route home.index --route contact-us.index --url https://example.com --url https://google.com
```

Since the command do not support passing query strings, you can do it by creating your own command and call this one.

```
namespace App\Console\Commands;

use Illuminate\Console\Command;

class MyCommand extends Command
{
  protected $signature = 'my-command:run';

  protected $description = 'Scan my routes.';

  public function handle()
  {
    $this->call("lightship:run", [
      "--url" => [
        route("home.index", ["lang" => "en"]),
        route("contact-us.index", ["theme" => "dark"]),
      ]
    ]);
  }
}
```

### 3. Show failed/passed rules when using the command

[](#3-show-failedpassed-rules-when-using-the-command)

By default, the command does not show the failed/passed rules of each URLs to save some space. If you want to show the detail, use the `--detailed` option.

```
php artisan lightship:run --route home.index --detailed
```

Or by calling `Artisan::call`:

```
use Illuminate\Support\Facades\Artisan;

// ...

Artisan::call("lightship:run", [
  "--route" => "home.index",
  "--detailed" => true,
]);
```

Tests
-----

[](#tests)

```
composer check-platform-reqs
composer install
composer run analyse
composer run test
composer run lint
composer run scan
composer run check
composer run updates

```

Or

```
composer run all
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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 ~56 days

Total

5

Last Release

1249d ago

### Community

Maintainers

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

---

Top Contributors

[![khalyomede](https://avatars.githubusercontent.com/u/15908747?v=4)](https://github.com/khalyomede "khalyomede (30 commits)")

---

Tags

auditbrowserlesslaravellighthousephpweb

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lightship-core-lightship-laravel/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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