2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
2017-06-11 09:10:31 +08:00
|
|
|
namespace App\Models;
|
2017-06-09 02:28:26 +08:00
|
|
|
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
2017-06-11 09:10:31 +08:00
|
|
|
use Zizaco\Entrust\Traits\EntrustUserTrait;
|
2017-06-22 00:40:08 +08:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
2017-06-22 18:23:59 +08:00
|
|
|
use Illuminate\Contracts\Auth\CanResetPassword;
|
2017-06-09 02:28:26 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* App\User
|
|
|
|
*
|
|
|
|
* @property integer $id
|
|
|
|
* @property string $name
|
|
|
|
* @property string $email
|
|
|
|
* @property string $password
|
|
|
|
* @property string $remember_token
|
|
|
|
* @property \Carbon\Carbon $created_at
|
|
|
|
* @property \Carbon\Carbon $updated_at
|
|
|
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
|
|
|
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $unreadNotifications
|
2017-06-11 09:10:31 +08:00
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereId($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereName($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereEmail($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User wherePassword($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereRememberToken($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereCreatedAt($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereUpdatedAt($value)
|
2017-06-09 02:28:26 +08:00
|
|
|
* @mixin \Eloquent
|
|
|
|
*/
|
|
|
|
class User extends Authenticatable
|
|
|
|
{
|
|
|
|
use Notifiable;
|
2017-06-11 09:10:31 +08:00
|
|
|
use EntrustUserTrait;
|
2017-06-09 02:28:26 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'name', 'email', 'password',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be hidden for arrays.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $hidden = [
|
|
|
|
'password', 'remember_token',
|
|
|
|
];
|
|
|
|
}
|