*/ protected $fillable = [ 'name', 'logo', 'responsable', 'url', 'informations', 'employees', 'latitude', 'longitude', 'activity_id', 'sector_id', 'published', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'published' => 'boolean', ]; /** * Relations should be included in the cache. * * @var list */ protected static $cacheRelations = [ 'companyActivity', ]; // * RELATIONSHIPS /** * Get the activity for this company. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\CompanyActivity,$this> */ public function companyActivity(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(CompanyActivity::class, 'activity_id'); } /** * Get the sector for this company. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\CompanySector,$this> */ public function companySector(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(CompanySector::class, 'sector_id'); } }