File manager - Edit - /var/www/payraty/hris/app/Models/JobCategory.php
Back
<?php namespace App\Models; use Illuminate\Support\Facades\Auth; use App\Scopes\OrganisationScope; use Illuminate\Database\Eloquent\Model; class JobCategory extends Model { protected $fillable = [ 'title', 'created_by', 'organisation_id', ]; protected static function booted() { static::addGlobalScope(new OrganisationScope); static::creating(function ($model) { if (Auth::check()) { $model->organisation_id = Auth::user()->organisation_id; } }); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0.84 |
proxy
|
phpinfo
|
Settings