*/ use BumpsContentVersion, HasFactory, HasImages, HasRevisions, HasTranslations, SoftDeletes; /** * The name is a proper noun — an association is called what it is called * in every language — so only the prose about it is translated. * * @var array */ public array $translatable = ['sector']; protected function casts(): array { return [ 'is_public' => 'boolean', 'position' => 'integer', ]; } /** * @return array */ public function imageAttributes(): array { return ['logo']; } /** * @return BelongsTo */ public function logoMedia(): BelongsTo { return $this->imageRelation('logo'); } /** * @return HasMany */ public function projects(): HasMany { return $this->hasMany(Project::class); } /** * @return HasMany */ public function testimonials(): HasMany { return $this->hasMany(Testimonial::class); } /** * @param Builder<$this> $query * @return Builder<$this> */ public function scopePublic(Builder $query): Builder { return $query->where('is_public', true); } }