*/ use HasFactory; protected static function newFactory() { return \Domains\Settings\Factories\LanguageFactory::new(); } protected $fillable = [ 'short_code', 'name', 'native_name', 'is_active' ]; protected $casts = [ 'is_active' => 'boolean' ]; /** * @return BelongsToMany */ public function platformInstances(): BelongsToMany { return $this->belongsToMany(PlatformInstance::class) ->withPivot(['platform_language_id', 'is_default']) ->withTimestamps(); } /** * @return HasMany */ public function platformChannels(): HasMany { return $this->hasMany(PlatformChannel::class); } /** * @return BelongsToMany */ public function feeds(): BelongsToMany { return $this->belongsToMany(Feed::class, 'feed_languages') ->withPivot(['url', 'settings', 'is_active', 'is_primary']) ->withTimestamps(); } }