for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Models;
use App\Events\User\Deleting;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
final class User extends Authenticatable
{
use Notifiable;
Illuminate\Notifications\Notifiable
$email
App\Models\User
protected $fillable = [
'name', 'email', 'password',
];
protected $dispatchesEvents = [
'deleting' => Deleting::class,
private ?UserToken $currentToken = null;
public function tokens(): HasMany
return $this->hasMany(UserToken::class);
}
public function setCurrentToken(UserToken $token)
$this->currentToken = $token;
public function getCurrentToken()
return $this->currentToken;
public function getEmail(): string
return $this->getAttributeValue('email');
return $this->getAttributeValue('email')
boolean|null
string