psalm-plugin-laravel/tests/Models/Mechanic.php

22 lines
430 B
PHP
Raw Normal View History

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