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