ldc-gen-game-web/app/Models/User.php

62 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2020-10-21 15:26:21 +02:00
<?php
namespace App\Models;
2020-10-21 15:26:21 +02: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 = [
2020-10-29 15:40:23 +01:00
'crm_id',
'civility',
'firstname',
'lastname',
'birth_date',
'email',
'password',
'address',
'address2',
'town',
'postal_code',
'country',
'email_verify_token',
'email_verified'
2020-10-21 15:26:21 +02:00
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
/**
* Has Many Participation relation
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
2021-08-18 17:08:02 +02:00
public function participations()
{
return $this->hasMany(Participation::class, 'user_id');
}
2020-10-21 15:26:21 +02:00
}