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('offplan::offplan.label.name'), "placeholder" => trans('offplan::offplan.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'emirate_id' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.emirate_id'), "placeholder" => trans('offplan::offplan.placeholder.emirate_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location_id' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.location_id'), "placeholder" => trans('offplan::offplan.placeholder.location_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ploat_no' => [ "type" => 'text', "label" => trans('offplan::offplan.label.ploat_no'), "placeholder" => trans('offplan::offplan.placeholder.ploat_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'land_no' => [ "type" => 'text', "label" => trans('offplan::offplan.label.land_no'), "placeholder" => trans('offplan::offplan.placeholder.land_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type_id' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.type_id'), "placeholder" => trans('offplan::offplan.placeholder.type_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'maintanence_fee' => [ "type" => 'text', "label" => trans('offplan::offplan.label.maintanence_fee'), "placeholder" => trans('offplan::offplan.placeholder.maintanence_fee'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'floors' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.floors'), "placeholder" => trans('offplan::offplan.placeholder.floors'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ploat_area' => [ "type" => 'text', "label" => trans('offplan::offplan.label.ploat_area'), "placeholder" => trans('offplan::offplan.placeholder.ploat_area'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bua' => [ "type" => 'text', "label" => trans('offplan::offplan.label.bua'), "placeholder" => trans('offplan::offplan.placeholder.bua'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_id' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.contact_id'), "placeholder" => trans('offplan::offplan.placeholder.contact_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('offplan::offplan.label.description'), "placeholder" => trans('offplan::offplan.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'developer_id' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.developer_id'), "placeholder" => trans('offplan::offplan.placeholder.developer_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bank' => [ "type" => 'text', "label" => trans('offplan::offplan.label.bank'), "placeholder" => trans('offplan::offplan.placeholder.bank'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_no' => [ "type" => 'text', "label" => trans('offplan::offplan.label.account_no'), "placeholder" => trans('offplan::offplan.placeholder.account_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'municipality_no' => [ "type" => 'text', "label" => trans('offplan::offplan.label.municipality_no'), "placeholder" => trans('offplan::offplan.placeholder.municipality_no'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'documents' => [ "type" => 'text', "label" => trans('offplan::offplan.label.documents'), "placeholder" => trans('offplan::offplan.placeholder.documents'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notes' => [ "type" => 'text', "label" => trans('offplan::offplan.label.notes'), "placeholder" => trans('offplan::offplan.placeholder.notes'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'facilities' => [ "type" => 'text', "label" => trans('offplan::offplan.label.facilities'), "placeholder" => trans('offplan::offplan.placeholder.facilities'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'amenities' => [ "type" => 'text', "label" => trans('offplan::offplan.label.amenities'), "placeholder" => trans('offplan::offplan.placeholder.amenities'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_name' => [ "type" => 'text', "label" => trans('offplan::offplan.label.contact_name'), "placeholder" => trans('offplan::offplan.placeholder.contact_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_phone' => [ "type" => 'numeric', "label" => trans('offplan::offplan.label.contact_phone'), "placeholder" => trans('offplan::offplan.placeholder.contact_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_description' => [ "type" => 'text', "label" => trans('offplan::offplan.label.contact_description'), "placeholder" => trans('offplan::offplan.placeholder.contact_description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'finance_company' => [ "type" => 'text', "label" => trans('offplan::offplan.label.finance_company'), "placeholder" => trans('offplan::offplan.placeholder.finance_company'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'loan_term' => [ "type" => 'text', "label" => trans('offplan::offplan.label.loan_term'), "placeholder" => trans('offplan::offplan.placeholder.loan_term'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'payment_plan' => [ "type" => 'text', "label" => trans('offplan::offplan.label.payment_plan'), "placeholder" => trans('offplan::offplan.placeholder.payment_plan'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'specifications' => [ "type" => 'text', "label" => trans('offplan::offplan.label.specifications'), "placeholder" => trans('offplan::offplan.placeholder.specifications'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'brochure' => [ "type" => 'text', "label" => trans('offplan::offplan.label.brochure'), "placeholder" => trans('offplan::offplan.placeholder.brochure'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'video' => [ "type" => 'text', "label" => trans('offplan::offplan.label.video'), "placeholder" => trans('offplan::offplan.placeholder.video'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'floor_plans' => [ "type" => 'text', "label" => trans('offplan::offplan.label.floor_plans'), "placeholder" => trans('offplan::offplan.placeholder.floor_plans'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'handover_date' => [ "type" => 'text', "label" => trans('offplan::offplan.label.handover_date'), "placeholder" => trans('offplan::offplan.placeholder.handover_date'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'banner_image' => [ "type" => 'text', "label" => trans('offplan::offplan.label.banner_image'), "placeholder" => trans('offplan::offplan.placeholder.banner_image'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('offplan::offplan.label.title'), "placeholder" => trans('offplan::offplan.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'subtitle' => [ "type" => 'text', "label" => trans('offplan::offplan.label.subtitle'), "placeholder" => trans('offplan::offplan.placeholder.subtitle'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'tag_line' => [ "type" => 'text', "label" => trans('offplan::offplan.label.tag_line'), "placeholder" => trans('offplan::offplan.placeholder.tag_line'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lattitude' => [ "type" => 'decimal', "label" => trans('offplan::offplan.label.lattitude'), "placeholder" => trans('offplan::offplan.placeholder.lattitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'longitude' => [ "type" => 'decimal', "label" => trans('offplan::offplan.label.longitude'), "placeholder" => trans('offplan::offplan.placeholder.longitude'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photos' => [ "type" => 'text', "label" => trans('offplan::offplan.label.photos'), "placeholder" => trans('offplan::offplan.placeholder.photos'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }