Created
June 11, 2019 08:34
-
-
Save luckys383/4eca01803e21c220b572f843c910dfe0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use App\Models\AppModel; | |
use App\Traits\FilterTrait; | |
class User extends AppModel | |
{ | |
use FilterTrait; | |
protected $table = 'users'; | |
/** | |
* set fillable fields | |
*/ | |
protected $fillable = ['role_id', 'name', 'email', 'status']; | |
/** | |
* set string fields for filtering | |
* @var array | |
*/ | |
protected $likeFilterFields = ['name', 'email']; | |
/** | |
* set boolean fields for filtering | |
* @var array | |
*/ | |
protected $boolFilterFields = ['status']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment