mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 06:16:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Builder;
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | |
| use Illuminate\Database\Eloquent\Relations\MorphTo;
 | |
| use Illuminate\Database\Eloquent\Relations\Pivot;
 | |
| use Illuminate\Database\Eloquent\SoftDeletingScope;
 | |
| 
 | |
| /**
 | |
|  * \App\Models\ActivityLogSubject.
 | |
|  *
 | |
|  * @property int $id
 | |
|  * @property int $activity_log_id
 | |
|  * @property int $subject_id
 | |
|  * @property string $subject_type
 | |
|  * @property ActivityLog|null $activityLog
 | |
|  * @property Model|\Eloquent $subject
 | |
|  *
 | |
|  * @method static Builder|ActivityLogSubject newModelQuery()
 | |
|  * @method static Builder|ActivityLogSubject newQuery()
 | |
|  * @method static Builder|ActivityLogSubject query()
 | |
|  */
 | |
| class ActivityLogSubject extends Pivot
 | |
| {
 | |
|     public $incrementing = true;
 | |
| 
 | |
|     public $timestamps = false;
 | |
| 
 | |
|     protected $table = 'activity_log_subjects';
 | |
| 
 | |
|     protected $guarded = ['id'];
 | |
| 
 | |
|     public function activityLog(): BelongsTo
 | |
|     {
 | |
|         return $this->belongsTo(ActivityLog::class);
 | |
|     }
 | |
| 
 | |
|     public function subject(): MorphTo
 | |
|     {
 | |
|         return $this->morphTo()->withoutGlobalScope(SoftDeletingScope::class);
 | |
|     }
 | |
| }
 | 
