15 lines
247 B
PHP
15 lines
247 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use App\Models\Contract;
|
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
|
|
|
trait HasContracts
|
|
{
|
|
public function contracts(): MorphMany
|
|
{
|
|
return $this->morphMany(Contract::class, 'contractable');
|
|
}
|
|
}
|