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' => [ 'service_id' => [ "type" => 'numeric', "label" => trans('service::provider.label.service_id'), "placeholder" => trans('service::provider.placeholder.service_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'bio' => [ "type" => 'text', "label" => trans('service::provider.label.bio'), "placeholder" => trans('service::provider.placeholder.bio'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'service_contract' => [ "type" => 'text', "label" => trans('service::provider.label.service_contract'), "placeholder" => trans('service::provider.placeholder.service_contract'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'medicare' => [ "type" => 'numeric', "label" => trans('service::provider.label.medicare'), "placeholder" => trans('service::provider.placeholder.medicare'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rate' => [ "type" => 'numeric', "label" => trans('service::provider.label.rate'), "placeholder" => trans('service::provider.placeholder.rate'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rate_type' => [ "type" => 'numeric', "label" => trans('service::provider.label.rate_type'), "placeholder" => trans('service::provider.placeholder.rate_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'availability' => [ "type" => 'radios', "label" => trans('service::provider.label.availability'), "placeholder" => trans('service::provider.placeholder.availability'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'profile' => [ "type" => 'text', "label" => trans('service::provider.label.profile'), "placeholder" => trans('service::provider.placeholder.profile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'idemnity' => [ "type" => 'text', "label" => trans('service::provider.label.idemnity'), "placeholder" => trans('service::provider.placeholder.idemnity'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'liability' => [ "type" => 'text', "label" => trans('service::provider.label.liability'), "placeholder" => trans('service::provider.placeholder.liability'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'policy' => [ "type" => 'numeric', "label" => trans('service::provider.label.policy'), "placeholder" => trans('service::provider.placeholder.policy'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }