PHPackages                             lamine/license - 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. lamine/license

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

lamine/license
==============

A licensing library for php softwares

v1.1.2(2y ago)323MITPHPPHP &gt;=7.0

Since Aug 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/omarlamin01/Lamine-License)[ Packagist](https://packagist.org/packages/lamine/license)[ RSS](/packages/lamine-license/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (4)Versions (17)Used By (0)

Lamine License
==============

[](#lamine-license)

A simple license generator for your projects. Made by [Lamine omar](https://github.com/omarlamin01).

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

[](#installation)

```
composer require lamine/license
```

Usage
-----

[](#usage)

### 1. Setup the environment variables

[](#1-setup-the-environment-variables)

Make sure to set the 'APP\_NAME' in your .env file.

```
APP_NAME="Your App Name"
```

Then add this variables to your .env file. These variables will be used to generate the license. Otherwise the license will not be generated.

```
COMPANY_URL="https://www.yourwebsite.com/"
COMPANY_NAME="Your Company Name"
COMPANY_MAIL="your-company@email.com"
COMPANY_PHONE="+212 6 00 00 00 00"
```

Important: Make sure that the `COMPANY_URL` variable ends with a slash. And leads to a valid url that contains your licensing system backend.

### 2. Run Migration

[](#2-run-migration)

```
php artisan migrate
```

This command will create the tables license &amp; timestamps in your database. These tables will be used to store the licenses.

### 3. setup your home route

[](#3-setup-your-home-route)

```
Route::get('/', function () {

    if (Index::validateLicense()) {
        return view('welcome');
    } else {
        return view('License::LicenseExpired');
    }
})->name('home');
```

Or If you are using Inertia, you can do this:

```
public function index()
{
    if (Index::validateLicense()) {
        return Inertia::render('Auth/Login');
    } else {
        return view('License::LicenseExpired');
    }
}
```

### 4. Add middleware to your routes

[](#4-add-middleware-to-your-routes)

Go to your 'app/Http/Kernel.php' file and add the middleware to your routes.

```
protected $routeMiddleware = [
        .
        .
        .
        'license-api' => \Lamine\License\Middleware\ApiWare::class,
        'license-web' => \Lamine\License\Middleware\WebWare::class,
    ];
```

Then add the middleware to your routes.

`routes/web.php`

```
Route::group(['middleware' => ['license-web']], function () {
    // all your web routes here
});
```

`routes/api.php`

```
Route::group(['middleware' => ['license-api']], function () {
    // all your api routes here
});
```

### 5. Setup the 'app/console/Kernel.php' file

[](#5-setup-the-appconsolekernelphp-file)

Add this line to the 'schedule' function in your 'app/console/Kernel.php' file.

```
// check license every week
$schedule->call([Index::class, 'checkLicense'])->weekly();

// check time every hour
$schedule->call(function () {
    app()->call([TimeChecker::class, 'checkTime']);
})->hourly();

// truncate timestamps table every 24 hours
$schedule->call(function () {
    TimeChecker::truncateTimestamps();
})->daily();
```

Run the scheduler.

```
php artisan schedule:work
```

After finishing all the steps, run development server.

```
php artisan serve
```

And go to the home page. If everything is ok, you will see the license expired page.

[![screenshot](shot.PNG)](shot.PNG)

In this page you can activate your license either by entering the license key or by using a secret key of your company.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

16

Last Release

1023d ago

PHP version history (3 changes)v1.0.0PHP ^7.3|^8.0

v1.0.1PHP ^7.3|^8.2

v1.0.2PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76263000?v=4)[omar lamine](/maintainers/omarlamin01)[@omarlamin01](https://github.com/omarlamin01)

---

Top Contributors

[![omarlamin01](https://avatars.githubusercontent.com/u/76263000?v=4)](https://github.com/omarlamin01 "omarlamin01 (64 commits)")

### Embed Badge

![Health badge](/badges/lamine-license/health.svg)

```
[![Health](https://phpackages.com/badges/lamine-license/health.svg)](https://phpackages.com/packages/lamine-license)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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