for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use App\Enum\Gender;
use App\Infrastructure\Foundation\Auth\User as Authenticatable;
use App\Notifications\ResetPasswordQueued;
use App\Notifications\VerifyEmailQueued;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Notifications\Notifiable;
use Propaganistas\LaravelPhone\Casts\E164PhoneNumberCast;
class User extends Authenticatable implements MustVerifyEmail
{
use HasFactory, Notifiable,
App\Models\Concerns\User\Relation
App\Models\User
$name
$map
$permissions
$guard_name
Concerns\User\Attribute,
Concerns\User\Relation;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'username',
'fullname',
'gender',
'email',
'phone_country',
'phone',
'password',
];
* The attributes that should be hidden for arrays.
protected $hidden = [
'remember_token',
* The attributes that should be cast to native types.
protected $casts = [
'gender' => Gender::class,
'phone' => E164PhoneNumberCast::class,
'email_verified_at' => 'datetime',
* {@inheritDoc}
public function sendEmailVerificationNotification()
$this->notify(new VerifyEmailQueued);
}
public function sendPasswordResetNotification($token)
$this->notify(new ResetPasswordQueued($token));