PHPackages                             prageeth-peiris/site-allocator - 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. prageeth-peiris/site-allocator

ActiveLibrary

prageeth-peiris/site-allocator
==============================

A Laravel Package to Allocate Sites to a User

1.0.0(4y ago)04MITPHPPHP ^8.0

Since Apr 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/prageeth-peiris/laravel-site-allocator)[ Packagist](https://packagist.org/packages/prageeth-peiris/site-allocator)[ Docs](https://github.com/prageeth-peiris/site-allocator)[ RSS](/packages/prageeth-peiris-site-allocator/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Site Allocator
======================

[](#laravel-site-allocator)

A Simple Laravel Package to Allow / Disallow a site to a user. This is useful for projects that uses Site as a main model.

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

[](#requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 9.0

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

[](#installation)

You can install the package via composer:

```
composer require prageeth-peiris/site-allocator
```

Publish Configuration File

```
php artisan vendor:publish --provider="PrageethPeiris\SiteAllocator\SiteAllocatorServiceProvider" --tag="config"
```

Run migrations

```
php artisan migrate
```

Usage
-----

[](#usage)

Add ownSite trait to your User model

```
class User
{
    use ownSite;

}
```

```
use "is-site-allocated" middleware in your routes. Should pass the site_id as  a query parameter with request

```

Documentation
-------------

[](#documentation)

```
API Routes

 - GET /api/sites
 - GET /api/sites/id
 - POST /api/sites {name - string parameter , url string parameter}
 - PUT /api/sites {name - string parameter , url string parameter}
 - DELETE /api/sites/id
 - GET /api/user/id/sites
 - POST /api/user/id/sites  {sites - array parameter}

```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Prageeth Peiris](https://github.com/prageeth-peiris)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1503d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfaffa19f7b769d94631a89264b8a89517960ba5f9210af17983cecd8cd6e11a?d=identicon)[prageeth-peiris](/maintainers/prageeth-peiris)

---

Tags

prageeth-peirissite-allocator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prageeth-peiris-site-allocator/health.svg)

```
[![Health](https://phpackages.com/badges/prageeth-peiris-site-allocator/health.svg)](https://phpackages.com/packages/prageeth-peiris-site-allocator)
```

###  Alternatives

[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

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