1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/gsang-laravel-vue-element-admin

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
User.php 1.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Gsangu Отправлено 6 лет назад 6023959
<?php
namespace App;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements JWTSubject
{
use Notifiable;
/**
* Get the identifier that will be stored in the subject claim of the JWT.
*
* @return mixed
*/
public function getJWTIdentifier()
{
return $this->getKey();
}
/**
* Return a key value array, containing any custom claims to be added to the JWT.
*
* @return array
*/
public function getJWTCustomClaims()
{
return [];
}
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password', 'roles', 'default_pass'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
protected $casts = [
'roles' => 'array'
];
public function articles()
{
return $this->hasMany(Article::class, "user_id", "id");
}
}

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/gsang-laravel-vue-element-admin.git
git@gitlife.ru:oschina-mirror/gsang-laravel-vue-element-admin.git
oschina-mirror
gsang-laravel-vue-element-admin
gsang-laravel-vue-element-admin
master