setForm(); } /** * Return form elements. * * @return array. */ public function form($element = 'fields', $grouped = true) { $item = collect($this->form->get($element)); if ($element == 'fields' && $grouped == true) { return $item->groupBy(['group', 'section']); } return $item; } /** * Sets the form and form elements. * @return null. */ public function setForm() { $this->form = collect([ 'form' => [ 'store' => [], 'update' => [], ], 'groups' => [ 'main' => 'Main', ], 'fields' => [ 'float_plan_id' => [ "type" => 'numeric', "label" => trans('logbook::iame_detail.label.float_plan_id'), "placeholder" => trans('logbook::iame_detail.placeholder.float_plan_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'radio_communication_message_sent_time' => [ "type" => 'time_picker', "label" => trans('logbook::iame_detail.label.radio_communication_message_sent_time'), "placeholder" => trans('logbook::iame_detail.placeholder.radio_communication_message_sent_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'radio_communication_message_received_time' => [ "type" => 'time_picker', "label" => trans('logbook::iame_detail.label.radio_communication_message_received_time'), "placeholder" => trans('logbook::iame_detail.placeholder.radio_communication_message_received_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'radio_communication_message_sent_details' => [ "type" => 'text', "label" => trans('logbook::iame_detail.label.radio_communication_message_sent_details'), "placeholder" => trans('logbook::iame_detail.placeholder.radio_communication_message_sent_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'radio_communication_message_received_details' => [ "type" => 'text', "label" => trans('logbook::iame_detail.label.radio_communication_message_received_details'), "placeholder" => trans('logbook::iame_detail.placeholder.radio_communication_message_received_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'incidents_medical_time' => [ "type" => 'time_picker', "label" => trans('logbook::iame_detail.label.incidents_medical_time'), "placeholder" => trans('logbook::iame_detail.placeholder.incidents_medical_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'incidents_other_time' => [ "type" => 'time_picker', "label" => trans('logbook::iame_detail.label.incidents_other_time'), "placeholder" => trans('logbook::iame_detail.placeholder.incidents_other_time'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'incidents_medical_details' => [ "type" => 'text', "label" => trans('logbook::iame_detail.label.incidents_medical_details'), "placeholder" => trans('logbook::iame_detail.placeholder.incidents_medical_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'incidents_other_details' => [ "type" => 'text', "label" => trans('logbook::iame_detail.label.incidents_other_details'), "placeholder" => trans('logbook::iame_detail.placeholder.incidents_other_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }