xjchen/limited-trait

There is no license information available for the latest version (v0.0.1) of this package.

v0.0.1 2015-01-31 04:53 UTC

This package is not auto-updated.

Last update: 2024-10-26 17:45:35 UTC


README

This is a trait used for eloquent global scope. It can be used to add where condition to the query.

Installation

Add xjchen/limited-trait as a requirement to composer.json:

{
    "require": {
        "xjchen/limited-trait": "dev-master"
    }
}

Update your packages with composer update or install with composer install.

You can also add the package using composer require xjchen/limited-trait and later specifying the version you want (for now, dev-master is your best bet).

Usage

  1. add use LimitedTrait in your model
  2. fill protected $limitedColumns = ['limited_column1', 'limited_column2']
  3. add method getLimitedLimitedColumn1 and getLimitedLimitedColumns2