File manager - Edit - /var/www/html/spdc/api/app/Models/OccurrencyScripture.php
Back
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use App\Events\OccurrencyScriptureCreating; 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 OccurrencyScripture extends Model { use HasFactory; use HasUuids; protected $fillable = [ 'code', 'note', 'occurrency_id', 'place_type_id', 'responsable', 'publication', 'page', 'year', 'file' ]; protected $casts = [ 'responsable' => 'array' ]; protected $dispatchesEvents = [ 'creating' => OccurrencyScriptureCreating::class, ]; public function signature() { return $this->morphOne(Signature::class, 'signatureable'); } /** * Get the occurrency that owns the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function occurrency(): BelongsTo { return $this->belongsTo(Occurrency::class); } /** * Get the placeType that owns the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function placeType(): BelongsTo { return $this->belongsTo(PlaceType::class); } /** * Get all of the interdictions for the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function interdictions(): HasMany { return $this->hasMany(OccurrencyScriptureInterdiction::class, 'scripture_id'); } /** * Get all of the disinterdictions for the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function disinterdictions(): HasMany { return $this->hasMany(OccurrencyScriptureDisinterdiction::class, 'scripture_id'); } /** * Get all of the notifications for the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function notifications(): HasMany { return $this->hasMany(OccurrencyScriptureNotification::class, 'scripture_id'); } /** * Get all of the impediments for the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function impediments(): HasMany { return $this->hasMany(OccurrencyScriptureImpediment::class, 'scripture_id'); } /** * Get all of the demolitions for the OccurrencyScripture * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function demolitions(): HasMany { return $this->hasMany(OccurrencyScriptureDemolition::class, 'scripture_id'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings