psalm-plugin-laravel/tests/Models/Mechanic.php
2022-02-10 17:45:51 +01:00

22 lines
430 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
final class Mechanic extends Model
{
protected $table = 'mechanics';
/**
* @psalm-return HasOneThrough<User>
*/
public function carOwner(): HasOneThrough
{
return $this->hasOneThrough(User::class, Car::class);
}
}