2021-04-16 01:00:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
|
2022-03-19 16:48:21 +01:00
|
|
|
class User extends Authenticatable implements MustVerifyEmail
|
2021-04-16 01:00:00 +02:00
|
|
|
{
|
|
|
|
use HasFactory, Notifiable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
|
|
'email',
|
2022-11-08 16:11:59 +01:00
|
|
|
'image',
|
2021-04-16 01:00:00 +02:00
|
|
|
'password',
|
2022-11-08 16:11:59 +01:00
|
|
|
'provider',
|
|
|
|
'provider_id',
|
|
|
|
'email_verified_at',
|
|
|
|
'littlelink_name',
|
|
|
|
|
2021-04-16 01:00:00 +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',
|
|
|
|
];
|
2022-11-08 16:11:59 +01:00
|
|
|
|
|
|
|
public function visits()
|
|
|
|
{
|
|
|
|
return visits($this)->relation();
|
|
|
|
}
|
|
|
|
public function socialAccounts()
|
|
|
|
{
|
|
|
|
return $this->hasMany(socialAccount::class);
|
|
|
|
}
|
2021-04-16 01:00:00 +02:00
|
|
|
}
|