$filters * @property Carbon $created_at * @property Carbon $updated_at * @method static create(array $array) */ class Route extends Pivot { protected $table = 'routes'; public $incrementing = false; protected $fillable = [ 'feed_id', 'platform_channel_id', 'is_active', 'priority', 'filters' ]; protected $casts = [ 'is_active' => 'boolean', 'filters' => 'array' ]; /** * @return BelongsTo */ public function feed(): BelongsTo { return $this->belongsTo(Feed::class); } /** * @return BelongsTo */ public function platformChannel(): BelongsTo { return $this->belongsTo(PlatformChannel::class); } /** * @return HasMany */ public function keywords(): HasMany { return $this->hasMany(Keyword::class, 'feed_id', 'feed_id') ->where('platform_channel_id', $this->platform_channel_id); } }