ok
Direktori : /home2/selectio/public_html/fms-worksuite/app/Traits/ |
Current File : /home2/selectio/public_html/fms-worksuite/app/Traits/HasCompany.php |
<?php namespace App\Traits; use App\Models\Company; use App\Scopes\CompanyScope; use Illuminate\Database\Eloquent\Relations\BelongsTo; trait HasCompany { protected static function booted() { static::addGlobalScope(new CompanyScope()); } public function company(): BelongsTo { return $this->belongsTo(Company::class); } }