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' => [ 'name' => [ "type" => 'text', "label" => trans('engine::asset.label.name'), "placeholder" => trans('engine::asset.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type_m' => [ "type" => 'text', "label" => trans('engine::asset.label.type_m'), "placeholder" => trans('engine::asset.placeholder.type_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'class_m' => [ "type" => 'text', "label" => trans('engine::asset.label.class_m'), "placeholder" => trans('engine::asset.placeholder.class_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'operating_area_m' => [ "type" => 'text', "label" => trans('engine::asset.label.operating_area_m'), "placeholder" => trans('engine::asset.placeholder.operating_area_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manufacture_m' => [ "type" => 'text', "label" => trans('engine::asset.label.manufacture_m'), "placeholder" => trans('engine::asset.placeholder.manufacture_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'make_m' => [ "type" => 'text', "label" => trans('engine::asset.label.make_m'), "placeholder" => trans('engine::asset.placeholder.make_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'model_m' => [ "type" => 'text', "label" => trans('engine::asset.label.model_m'), "placeholder" => trans('engine::asset.placeholder.model_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'certificate_of_operation_m' => [ "type" => 'text', "label" => trans('engine::asset.label.certificate_of_operation_m'), "placeholder" => trans('engine::asset.placeholder.certificate_of_operation_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'certificate_of_survey_m' => [ "type" => 'text', "label" => trans('engine::asset.label.certificate_of_survey_m'), "placeholder" => trans('engine::asset.placeholder.certificate_of_survey_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'communications_m' => [ "type" => 'html_editor', "label" => trans('engine::asset.label.communications_m'), "placeholder" => trans('engine::asset.placeholder.communications_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'navigations_m' => [ "type" => 'html_editor', "label" => trans('engine::asset.label.navigations_m'), "placeholder" => trans('engine::asset.placeholder.navigations_m'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'images' => [ "type" => 'text', "label" => trans('engine::asset.label.images'), "placeholder" => trans('engine::asset.placeholder.images'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'uvi' => [ "type" => 'text', "label" => trans('engine::asset.label.uvi'), "placeholder" => trans('engine::asset.placeholder.uvi'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hull_identification_no' => [ "type" => 'text', "label" => trans('engine::asset.label.hull_identification_no'), "placeholder" => trans('engine::asset.placeholder.hull_identification_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'buoyancy' => [ "type" => 'text', "label" => trans('engine::asset.label.buoyancy'), "placeholder" => trans('engine::asset.placeholder.buoyancy'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manufacture_date' => [ "type" => 'text', "label" => trans('engine::asset.label.manufacture_date'), "placeholder" => trans('engine::asset.placeholder.manufacture_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'length' => [ "type" => 'text', "label" => trans('engine::asset.label.length'), "placeholder" => trans('engine::asset.placeholder.length'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'beam_width' => [ "type" => 'text', "label" => trans('engine::asset.label.beam_width'), "placeholder" => trans('engine::asset.placeholder.beam_width'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'draft' => [ "type" => 'text', "label" => trans('engine::asset.label.draft'), "placeholder" => trans('engine::asset.placeholder.draft'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'displacement' => [ "type" => 'text', "label" => trans('engine::asset.label.displacement'), "placeholder" => trans('engine::asset.placeholder.displacement'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hull_type' => [ "type" => 'text', "label" => trans('engine::asset.label.hull_type'), "placeholder" => trans('engine::asset.placeholder.hull_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hull_construction' => [ "type" => 'text', "label" => trans('engine::asset.label.hull_construction'), "placeholder" => trans('engine::asset.placeholder.hull_construction'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hull_color' => [ "type" => 'text', "label" => trans('engine::asset.label.hull_color'), "placeholder" => trans('engine::asset.placeholder.hull_color'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'other_distinguishing_features' => [ "type" => 'text', "label" => trans('engine::asset.label.other_distinguishing_features'), "placeholder" => trans('engine::asset.placeholder.other_distinguishing_features'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'life_raft' => [ "type" => 'text', "label" => trans('engine::asset.label.life_raft'), "placeholder" => trans('engine::asset.placeholder.life_raft'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'vessel_propulsion_type' => [ "type" => 'text', "label" => trans('engine::asset.label.vessel_propulsion_type'), "placeholder" => trans('engine::asset.placeholder.vessel_propulsion_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_engine_power' => [ "type" => 'text', "label" => trans('engine::asset.label.max_engine_power'), "placeholder" => trans('engine::asset.placeholder.max_engine_power'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_engine_weight' => [ "type" => 'text', "label" => trans('engine::asset.label.max_engine_weight'), "placeholder" => trans('engine::asset.placeholder.max_engine_weight'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'no_of_engines' => [ "type" => 'numeric', "label" => trans('engine::asset.label.no_of_engines'), "placeholder" => trans('engine::asset.placeholder.no_of_engines'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_no_persons' => [ "type" => 'numeric', "label" => trans('engine::asset.label.max_no_persons'), "placeholder" => trans('engine::asset.placeholder.max_no_persons'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'max_load' => [ "type" => 'numeric', "label" => trans('engine::asset.label.max_load'), "placeholder" => trans('engine::asset.placeholder.max_load'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fuel_type' => [ "type" => 'text', "label" => trans('engine::asset.label.fuel_type'), "placeholder" => trans('engine::asset.placeholder.fuel_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fuel_tank_capacity' => [ "type" => 'text', "label" => trans('engine::asset.label.fuel_tank_capacity'), "placeholder" => trans('engine::asset.placeholder.fuel_tank_capacity'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }