step 1, 2 and 3 of the implementation plan
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Fortify\TwoFactorAuthenticatable;
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
final class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable, TwoFactorAuthenticatable;
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -46,4 +47,28 @@ protected function casts(): array
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all sessions for this user.
|
||||
*/
|
||||
public function sessions(): HasMany
|
||||
{
|
||||
return $this->hasMany(Session::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all screenings for this user.
|
||||
*/
|
||||
public function screenings(): HasMany
|
||||
{
|
||||
return $this->hasMany(Screening::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all logs for this user.
|
||||
*/
|
||||
public function logs(): HasMany
|
||||
{
|
||||
return $this->hasMany(Log::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user