File manager - Edit - /var/www/html/spdc/api/app/Models/ScaleFunction.php
Back
<?php namespace App\Models; use App\Casts\Boolean; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Concerns\HasUuids; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class ScaleFunction extends Model { use HasFactory; use HasUuids; protected $fillable = [ 'name', 'enable', 'type' // ]; protected $casts = [ 'enable' => Boolean::class, ]; /** * The externalAgents that belong to the ExternalAgent * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function externalAgents(): BelongsToMany { return $this->belongsToMany(ExternalAgent::class, 'external_agent_scale_function', 'scale_function_id', 'external_agent_id'); } /** * The internalAgents that belong to the ExternalAgent * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function internalAgents(): BelongsToMany { return $this->belongsToMany(User::class, 'internal_agent_scale_function', 'scale_function_id', 'user_id'); } /** * Get all of the extraHours for the ScaleFunction * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function extraHours(): HasMany { return $this->hasMany(ScaleExtraHour::class); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings