Skip to content

Instantly share code, notes, and snippets.

@nissicreative
Last active October 11, 2017 17:55
Show Gist options
  • Save nissicreative/6707afd67dd96c499e0c9be10c280116 to your computer and use it in GitHub Desktop.
Save nissicreative/6707afd67dd96c499e0c9be10c280116 to your computer and use it in GitHub Desktop.
Laravel User Model
<?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