File manager - Edit - /var/www/html/spdc/api/app/Models/Scale.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\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; class Scale extends Model { use HasFactory; use HasUuids; protected $fillable = [ 'warning', 'month', 'year', 'department_id', 'finished' ]; protected $casts = [ 'warning' => Boolean::class, 'finished' => Boolean::class, 'month' => 'integer', 'year' => 'integer', ]; /** * Get the department that owns the Scale * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function department(): BelongsTo { return $this->belongsTo(Department::class, 'department_id'); } /** * Get all of the days for the Scale * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function days(): HasMany { return $this->hasMany(ScaleDay::class); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.13 |
proxy
|
phpinfo
|
Settings