I'm building an job application plug-in in OctoberCms. Now only 1 of the 2 items apear on the front-end. I would like all the items to display. But now I can only select 1 by imput the id in the backend at the component propperty
I have to add this$properties = $this->getProperties();
somewhere in my code but I can't figure out where. any suggestions?
php namespace Hessel\Vacatures\Components; use Cms\Classes\ComponentBase; use Hessel\Vacatures\Models\Vacature as VacatureModel; class vacature extends ComponentBase { public function componentDetails() { return [ 'name' => 'Vacature Component', 'description' => 'No description provided yet...' ]; } public function defineProperties() { return [ 'vacatureId' => [ 'title' => 'Vacature' ], ]; } public function getVacatureIdOptions() { return VacatureModel::select('id', 'title')->orderBy('title')->get()->lists('title', 'id'); } public function onRender() { $this->vacature = $this->page['vacature'] = VacatureModel::where('id', '=', $this -> property('vacatureId')) -> first(); } }