Path: blob/1.0-develop/app/Models/ActivityLogSubject.php
10259 views
<?php12namespace Pterodactyl\Models;34use Illuminate\Database\Eloquent\Relations\Pivot;5use Illuminate\Database\Eloquent\Relations\MorphTo;6use Illuminate\Database\Eloquent\Relations\BelongsTo;78/**9* \Pterodactyl\Models\ActivityLogSubject.10*11* @property int $id12* @property int $activity_log_id13* @property int $subject_id14* @property string $subject_type15* @property ActivityLog|null $activityLog16* @property \Illuminate\Database\Eloquent\Model $subject17*18* @method static \Illuminate\Database\Eloquent\Builder|ActivityLogSubject newModelQuery()19* @method static \Illuminate\Database\Eloquent\Builder|ActivityLogSubject newQuery()20* @method static \Illuminate\Database\Eloquent\Builder|ActivityLogSubject query()21*22* @mixin \Illuminate\Database\Eloquent\Model23*/24class ActivityLogSubject extends Pivot25{26public $incrementing = true;27public $timestamps = false;2829protected $table = 'activity_log_subjects';3031protected $guarded = ['id'];3233/**34* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\Pterodactyl\Models\ActivityLog, $this>35*/36public function activityLog(): BelongsTo37{38return $this->belongsTo(ActivityLog::class);39}4041/**42* @return \Illuminate\Database\Eloquent\Relations\MorphTo<\Illuminate\Database\Eloquent\Model, $this>43*/44public function subject(): MorphTo45{46$morph = $this->morphTo();47if (method_exists($morph, 'withTrashed')) { // @phpstan-ignore function.alreadyNarrowedType48return $morph->withTrashed();49}5051return $morph;52}53}545556