$companyModels List of published companies. */ public $companyModels; /** @var array<\App\Models\CompanyActivity> $companyActivityModels List of published company activities. */ public $companyActivityModels; /** * Create a new component instance. * * @param string $id * @param array $implantations */ public function __construct(string $id, array $implantations) { $this->id = $id; $this->implantations = $implantations; $this->companyModels = Company::getModelsCached() ->where('published', true) ->whereNotNull('sector_id') ->values(); $this->companyActivityModels = CompanyActivity::getModelsCached() ->where('published', true) ->values(); } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View */ public function render(): \Illuminate\Contracts\View\View { return view('components.front.pages.know-us.our-implantations', [ 'companyModels' => $this->companyModels, 'companyActivityModels' => $this->companyActivityModels, 'implantations' => $this->implantations, ]); } }