LAR_Maintenance/app/Traits/HasSettings.php

16 lines
272 B
PHP

<?php
namespace App\Traits;
use App\Models\Activity;
use App\Models\Setting;
use Illuminate\Database\Eloquent\Relations\MorphMany;
trait HasSettings
{
public function settings() : MorphMany
{
return $this->morphMany(Setting::class, 'settable');
}
}