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
Requires
- php: >=5.4.0
- illuminate/database: 4.2.*
- illuminate/support: 4.2.*
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
- add
use LimitedTrait
in your model - fill
protected $limitedColumns = ['limited_column1', 'limited_column2']
- add method
getLimitedLimitedColumn1
andgetLimitedLimitedColumns2