Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Latest commit

 

History

History
24 lines (17 loc) · 548 Bytes

readme.md

File metadata and controls

24 lines (17 loc) · 548 Bytes

Subtype (Laravel)

The Subtype trait is to split a database table into different models based on a column and it's value.

To use the trait you have to specify which column and what it's value is with the following attributes:

 use HeppyEkberg\Subtype\Subtype;

 public $subtypeColumn = 'COLUMN_NAME';
 public $subtypeValue = 'COLUMN_VALUE';

Composer:

  "require": {
    "heppyekberg/subtype-laravel": "^1"
  },
  "repositories": [
    { "type": "vcs", "url": "https://github.com/HeppyEkberg/subtype-laravel.git" }
  ],