ldc-mesbr-app/app/User.php
Thibault Richy 8a1054333a init
2019-01-15 14:17:15 +01:00

38 lines
750 B
PHP

<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password', 'roles',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The sites that belong to the user.
*/
public function sites()
{
return $this->belongsToMany('App\Site', 'site_user', 'user_id', 'site_id');
}
}