This commit is contained in:
Saeed Vaziry
2024-09-27 20:36:03 +02:00
committed by GitHub
parent b62c40c97d
commit f6bc04763b
122 changed files with 6609 additions and 807 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace App\Traits;
use App\Models\Project;
use App\Models\Server;
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
trait HasProjectThroughServer
{
public function project(): HasOneThrough
{
return $this->hasOneThrough(
Project::class,
Server::class,
'id',
'id',
'server_id',
'project_id'
);
}
}