PHPackages                             dialect/saasify - 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. dialect/saasify

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

dialect/saasify
===============

Saas support for laravel models

0.1.2(7y ago)031MITPHPPHP ~5.6|~7.0

Since Mar 9Pushed 7y ago2 watchersCompare

[ Source](https://github.com/kfvit/saasify)[ Packagist](https://packagist.org/packages/dialect/saasify)[ Docs](https://github.com/dialect-katrineholm/saasify)[ RSS](/packages/dialect-saasify/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/07e542b13f114f6c6214b3c5ae5486502d05c3f65492afc76216e036a10f4c63/68747470733a2f2f7472617669732d63692e636f6d2f6469616c6563742d6b617472696e65686f6c6d2f736161736966792e7376673f746f6b656e3d4564596871585a71345455757741677471313646266272616e63683d6d6173746572)](https://travis-ci.com/dialect-katrineholm/saasify)

saasify
=======

[](#saasify)

Saasify helps package models into modules for easier SAAS-management. Modules then gets attached to plans. This makes it possible to check if a user with a specific plan are able to access a model.

Install
-------

[](#install)

TODO

Usage
-----

[](#usage)

### Components

[](#components)

#### Plan

[](#plan)

###### Variables

[](#variables)

```
name, price

```

###### Relations

[](#relations)

```
modules

```

#### Module

[](#module)

###### Variables

[](#variables-1)

```
name

```

###### Relations

[](#relations-1)

```
plans, models

```

#### Model

[](#model)

###### Variables

[](#variables-2)

```
model, module, canCreate, canUpdate, canDelete, maxCount

```

###### Relations

[](#relations-2)

```
module

```

### Examples

[](#examples)

```
 ## Save / Update ##

  //You can use the saasify-helper to create components
  $plan = saasify()->plan();
  $model = saasify()->module();
  $model = saasify()->plan();

  //Change the variables using the helper methods
  $model = saasify()->model()->setModel(\App\Model::class)->setMaxCount(100);

  //Use the save-method to save or update a component
  $plan = saasify()->plan()->setName('foo')->save();

  //use the delete-function to remove component
  $plan->delete();

  ## Retrieve component ##

   $module = saasify()->modules()->find('foobar');
   $modules = saasify()->modules()->all();

   //It's also possible to use queries
   $plans = saasify()->plans(function($query){
      return $query->where('price', '>', 10);
   })->get();

   //The component-builders also supports
   saasify()->modules()->count();
   saasify()->modules()->first();

  ## Relations ##

   //to add a relaiton use the add-method
   $plan = saasify()->plan()->setName('foo')->save();
   $module = saasify()->module()->setName('bar')->save();
   $plan->addModule($module);

   //or remove using the remove-method
   $plan->removeModule($module)

   //As of now, you need to set the module on a model before its saved.
   $model = saasify()->model()
                     ->setModel(\App\Model::class)
                     ->setModule($module);

  ## Access ##

  //Add the trait HasPlans to the Laravel model that should have plans
  class User extends Model{
	   use HasPlans;
  }

  //this gives acceess to new method
  $user->canAccess(FooBar::class);
  $user->canAccess($fooBar);
  $user->canUpdate(..);
  $user->canDelete(..);
  $user->getCount(..);

  //for saasify to know how many instances of a model a user has,
  //add the saasify helper method to the model with the required logic for counting.
  class User extends Model{
	  public static function saasifyCurrent($user){
	    //logic here, example:
	    return $user->foobar()->count();
	  }
  }

```

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Total

3

Last Release

2752d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dcf6f255312be80b8f5499d58e3b8dc34857c764dfcc5e0a86bfc7c2ab36741b?d=identicon)[forss](/maintainers/forss)

---

Top Contributors

[![warbio](https://avatars.githubusercontent.com/u/17615740?v=4)](https://github.com/warbio "warbio (26 commits)")

---

Tags

dialectSaasify

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dialect-saasify/health.svg)

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

###  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)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[illuminate/cookie

The Illuminate Cookie package.

224.3M122](/packages/illuminate-cookie)

PHPackages © 2026

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