You've already forked lubo_comment_query
删除节目tag
This commit is contained in:
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ProgramTags extends Model
|
||||
{
|
||||
public function tag(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tags::class, "tag_id", "id");
|
||||
}
|
||||
|
||||
public function program(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Programs::class, "program_id", "id");
|
||||
}
|
||||
}
|
@ -11,16 +11,6 @@ class Programs extends Model
|
||||
return $this->hasMany(ProgramAppends::class, "program_id", "id")->orderByDesc("is_original");
|
||||
}
|
||||
|
||||
public function tag_pivots(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(ProgramTags::class, "program_id", "id")->orderBy("id");
|
||||
}
|
||||
|
||||
public function tags(): \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(Tags::class, ProgramTags::class, "program_id", "id", "id", "tag_id");
|
||||
}
|
||||
|
||||
public function video_pivots(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(ProgramVideos::class, "program_id", "id");
|
||||
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Tags extends Model
|
||||
{
|
||||
public function programs(): \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(Programs::class, ProgramTags::class, "tag_id", "id", "id", "program_id");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user