Teren-app/app/Models/Segment.php
Simon Pocrnjič 0f8cfd3f16 changes
2025-01-02 18:38:47 +01:00

22 lines
564 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Segment extends Model
{
/** @use HasFactory<\Database\Factories\SegmentFactory> */
use HasFactory;
public function contracts(): BelongsToMany {
return $this->belongsToMany(\App\Models\Contract::class);
}
public function clientCase(): BelongsToMany {
return $this->belongsToMany(\App\Models\ClientCase::class)->withTimestamps();
}
}