Last active
October 11, 2017 17:55
-
-
Save nissicreative/6707afd67dd96c499e0c9be10c280116 to your computer and use it in GitHub Desktop.
Laravel User Model
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 Illuminate\Database\Eloquent\SoftDeletes; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
use Illuminate\Notifications\Notifiable; | |
use Nissi\Traits\FormatsName; | |
use Nissi\Traits\HasAccessLevel; | |
use Nissi\Traits\HasAvatar; | |
class User extends Authenticatable | |
{ | |
use Notifiable, SoftDeletes, FormatsName, HasAvatar, HasAccessLevel; | |
/** | |
* The attributes that are mass assignable. | |
* | |
* @var array | |
*/ | |
protected $fillable = [ | |
'access_level', 'first_name', 'last_name', 'email', 'password', | |
]; | |
/** | |
* The attributes that should be hidden for arrays. | |
* | |
* @var array | |
*/ | |
protected $hidden = [ | |
'password', 'remember_token', | |
]; | |
/** | |
* The attributes that should be mutated to dates. | |
* | |
* @var array | |
*/ | |
protected $dates = ['deleted_at']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment