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' => [ 'team_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.team_id'), "placeholder" => trans('leads::leads.placeholder.team_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'ref' => [ "type" => 'numeric', "label" => trans('leads::leads.label.ref'), "placeholder" => trans('leads::leads.placeholder.ref'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title_name' => [ "type" => 'text', "label" => trans('leads::leads.label.title_name'), "placeholder" => trans('leads::leads.placeholder.title_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'first_name' => [ "type" => 'text', "label" => trans('leads::leads.label.first_name'), "placeholder" => trans('leads::leads.placeholder.first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('leads::leads.label.last_name'), "placeholder" => trans('leads::leads.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'stage' => [ "type" => 'text', "label" => trans('leads::leads.label.stage'), "placeholder" => trans('leads::leads.placeholder.stage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'assigned_user' => [ "type" => 'text', "label" => trans('leads::leads.label.assigned_user'), "placeholder" => trans('leads::leads.placeholder.assigned_user'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'amount' => [ "type" => 'text', "label" => trans('leads::leads.label.amount'), "placeholder" => trans('leads::leads.placeholder.amount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'probability' => [ "type" => 'numeric', "label" => trans('leads::leads.label.probability'), "placeholder" => trans('leads::leads.placeholder.probability'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lead_source' => [ "type" => 'text', "label" => trans('leads::leads.label.lead_source'), "placeholder" => trans('leads::leads.placeholder.lead_source'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'date_close' => [ "type" => 'date_time_picker', "label" => trans('leads::leads.label.date_close'), "placeholder" => trans('leads::leads.placeholder.date_close'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'account_name' => [ "type" => 'text', "label" => trans('leads::leads.label.account_name'), "placeholder" => trans('leads::leads.placeholder.account_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('leads::leads.label.email'), "placeholder" => trans('leads::leads.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('leads::leads.label.phone'), "placeholder" => trans('leads::leads.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'title' => [ "type" => 'text', "label" => trans('leads::leads.label.title'), "placeholder" => trans('leads::leads.placeholder.title'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website' => [ "type" => 'text', "label" => trans('leads::leads.label.website'), "placeholder" => trans('leads::leads.placeholder.website'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.country_id'), "placeholder" => trans('leads::leads.placeholder.country_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.state_id'), "placeholder" => trans('leads::leads.placeholder.state_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'district_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.district_id'), "placeholder" => trans('leads::leads.placeholder.district_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'zipcode' => [ "type" => 'text', "label" => trans('leads::leads.label.zipcode'), "placeholder" => trans('leads::leads.placeholder.zipcode'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'status_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.status_id'), "placeholder" => trans('leads::leads.placeholder.status_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'type_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.type_id'), "placeholder" => trans('leads::leads.placeholder.type_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'source_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.source_id'), "placeholder" => trans('leads::leads.placeholder.source_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'budget_from' => [ "type" => 'text', "label" => trans('leads::leads.label.budget_from'), "placeholder" => trans('leads::leads.placeholder.budget_from'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'budget_to' => [ "type" => 'text', "label" => trans('leads::leads.label.budget_to'), "placeholder" => trans('leads::leads.placeholder.budget_to'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'industry_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.industry_id'), "placeholder" => trans('leads::leads.placeholder.industry_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'assigned_id' => [ "type" => 'numeric', "label" => trans('leads::leads.label.assigned_id'), "placeholder" => trans('leads::leads.placeholder.assigned_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contact' => [ "type" => 'text', "label" => trans('leads::leads.label.contact'), "placeholder" => trans('leads::leads.placeholder.contact'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'description' => [ "type" => 'text', "label" => trans('leads::leads.label.description'), "placeholder" => trans('leads::leads.placeholder.description'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notes' => [ "type" => 'text', "label" => trans('leads::leads.label.notes'), "placeholder" => trans('leads::leads.placeholder.notes'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }