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 Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class UserToken extends Model
{
protected $fillable = [
'token',
];
public function user(): BelongsTo
return $this->belongsTo(User::class);
}
public function getUser(): User
return $this->getRelationValue('user');
return $this->getRelationValue('user')
null
App\Models\User