You've already forked lubo_comment_query
							
							VideoParts引入
This commit is contained in:
		
							
								
								
									
										14
									
								
								app/Models/VideoParts.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								app/Models/VideoParts.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | namespace App\Models; | ||||||
|  | 
 | ||||||
|  | use Illuminate\Database\Eloquent\Model; | ||||||
|  | 
 | ||||||
|  | class VideoParts extends Model | ||||||
|  | { | ||||||
|  |     public $timestamps = false; | ||||||
|  |     public function video(): \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||||
|  |     { | ||||||
|  |         return $this->belongsTo(Videos::class, "bvid", "bvid"); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -41,4 +41,9 @@ class Videos extends Model | |||||||
|     { |     { | ||||||
|         return $this->danmakus()->where("platform_id", "=", 3); |         return $this->danmakus()->where("platform_id", "=", 3); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     public function parts(): \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|  |     { | ||||||
|  |         return $this->hasMany(VideoParts::class, "bvid", "bvid"); | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user