xjchen / limited-trait
Installs: 72
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/xjchen/limited-trait
Requires
- php: >=5.4.0
- illuminate/database: 4.2.*
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2025-10-25 22:55:37 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 LimitedTraitin your model - fill
protected $limitedColumns = ['limited_column1', 'limited_column2'] - add method
getLimitedLimitedColumn1andgetLimitedLimitedColumns2