2017-12-24 14:17:18 +00:00
|
|
|
<?php
|
|
|
|
|
2017-12-30 20:23:09 +00:00
|
|
|
namespace App\Models;
|
2017-12-24 14:17:18 +00:00
|
|
|
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
|
|
|
|
class User extends Authenticatable
|
|
|
|
{
|
|
|
|
use Notifiable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
2017-12-30 20:23:09 +00:00
|
|
|
'name', 'email', 'password', 'introduction', 'avatar '
|
2017-12-24 14:17:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be hidden for arrays.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $hidden = [
|
|
|
|
'password', 'remember_token',
|
|
|
|
];
|
2017-12-30 20:23:09 +00:00
|
|
|
|
|
|
|
public function getHeaderAttribute()
|
|
|
|
{
|
|
|
|
return asset($this->avatar);
|
|
|
|
}
|
2017-12-24 14:17:18 +00:00
|
|
|
}
|