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('company::companies.label.name'), "placeholder" => trans('company::companies.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website_url' => [ "type" => 'text', "label" => trans('company::companies.label.website_url'), "placeholder" => trans('company::companies.placeholder.website_url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'active_employees' => [ "type" => 'text', "label" => trans('company::companies.label.active_employees'), "placeholder" => trans('company::companies.placeholder.active_employees'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'industry' => [ "type" => 'text', "label" => trans('company::companies.label.industry'), "placeholder" => trans('company::companies.placeholder.industry'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_email' => [ "type" => 'text', "label" => trans('company::companies.label.contact_email'), "placeholder" => trans('company::companies.placeholder.contact_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_address' => [ "type" => 'text', "label" => trans('company::companies.label.contact_address'), "placeholder" => trans('company::companies.placeholder.contact_address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact_phone' => [ "type" => 'text', "label" => trans('company::companies.label.contact_phone'), "placeholder" => trans('company::companies.placeholder.contact_phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'currency' => [ "type" => 'text', "label" => trans('company::companies.label.currency'), "placeholder" => trans('company::companies.placeholder.currency'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'work_hour_start' => [ "type" => 'time_picker', "label" => trans('company::companies.label.work_hour_start'), "placeholder" => trans('company::companies.placeholder.work_hour_start'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'work_hour_end' => [ "type" => 'time_picker', "label" => trans('company::companies.label.work_hour_end'), "placeholder" => trans('company::companies.placeholder.work_hour_end'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'start_date_leave_cycle' => [ "type" => 'date_picker', "label" => trans('company::companies.label.start_date_leave_cycle'), "placeholder" => trans('company::companies.placeholder.start_date_leave_cycle'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ext_dependants' => [ "type" => 'numeric', "label" => trans('company::companies.label.ext_dependants'), "placeholder" => trans('company::companies.placeholder.ext_dependants'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'spon_dependants' => [ "type" => 'numeric', "label" => trans('company::companies.label.spon_dependants'), "placeholder" => trans('company::companies.placeholder.spon_dependants'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'logo' => [ "type" => 'text', "label" => trans('company::companies.label.logo'), "placeholder" => trans('company::companies.placeholder.logo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'paid_leave_year' => [ "type" => 'numeric', "label" => trans('company::companies.label.paid_leave_year'), "placeholder" => trans('company::companies.placeholder.paid_leave_year'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sick_leave_year' => [ "type" => 'numeric', "label" => trans('company::companies.label.sick_leave_year'), "placeholder" => trans('company::companies.placeholder.sick_leave_year'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'maternity_leave_year' => [ "type" => 'numeric', "label" => trans('company::companies.label.maternity_leave_year'), "placeholder" => trans('company::companies.placeholder.maternity_leave_year'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'paternity_leave_year' => [ "type" => 'numeric', "label" => trans('company::companies.label.paternity_leave_year'), "placeholder" => trans('company::companies.placeholder.paternity_leave_year'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'work_week_start' => [ "type" => 'text', "label" => trans('company::companies.label.work_week_start'), "placeholder" => trans('company::companies.placeholder.work_week_start'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'work_week_end' => [ "type" => 'text', "label" => trans('company::companies.label.work_week_end'), "placeholder" => trans('company::companies.placeholder.work_week_end'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'carried_forward' => [ "type" => 'numeric', "label" => trans('company::companies.label.carried_forward'), "placeholder" => trans('company::companies.placeholder.carried_forward'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }