| 1 | <?php |
||
| 14 | class User extends Model implements AuthenticatableContract, |
||
|
|
|||
| 15 | AuthorizableContract, |
||
| 16 | CanResetPasswordContract |
||
| 17 | { |
||
| 18 | use Authenticatable, Authorizable, CanResetPassword, HasRolesAndAbilities; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The database table used by the model. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $table = 'users'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The attributes that are mass assignable. |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $fillable = ['name', 'fname', 'address', 'postal_code', 'city', 'country', 'email', 'password']; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * The attributes excluded from the model's JSON form. |
||
| 36 | * |
||
| 37 | * @var array |
||
| 38 | */ |
||
| 39 | protected $hidden = ['password', 'remember_token']; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Return the departments where the user is manager off. |
||
| 43 | * |
||
| 44 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
| 45 | */ |
||
| 46 | public function departmentManager() |
||
| 50 | } |
||
| 51 |