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' => [ 'influencer_id' => [ "type" => 'numeric', "label" => trans('influencer::social.label.influencer_id'), "placeholder" => trans('influencer::social.placeholder.influencer_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'channel_type' => [ "type" => 'numeric', "label" => trans('influencer::social.label.channel_type'), "placeholder" => trans('influencer::social.placeholder.channel_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('influencer::social.label.name'), "placeholder" => trans('influencer::social.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'follower_amount' => [ "type" => 'numeric', "label" => trans('influencer::social.label.follower_amount'), "placeholder" => trans('influencer::social.placeholder.follower_amount'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'engagement_score' => [ "type" => 'numeric', "label" => trans('influencer::social.label.engagement_score'), "placeholder" => trans('influencer::social.placeholder.engagement_score'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'category_id' => [ "type" => 'numeric', "label" => trans('influencer::social.label.category_id'), "placeholder" => trans('influencer::social.placeholder.category_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'text', "label" => trans('influencer::social.label.gender'), "placeholder" => trans('influencer::social.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'url' => [ "type" => 'text', "label" => trans('influencer::social.label.url'), "placeholder" => trans('influencer::social.placeholder.url'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'interests' => [ "type" => 'text', "label" => trans('influencer::social.label.interests'), "placeholder" => trans('influencer::social.placeholder.interests'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hashtags' => [ "type" => 'text', "label" => trans('influencer::social.label.hashtags'), "placeholder" => trans('influencer::social.placeholder.hashtags'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'divers_age' => [ "type" => 'text', "label" => trans('influencer::social.label.divers_age'), "placeholder" => trans('influencer::social.placeholder.divers_age'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'divers_gender' => [ "type" => 'text', "label" => trans('influencer::social.label.divers_gender'), "placeholder" => trans('influencer::social.placeholder.divers_gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'geographic' => [ "type" => 'radios', "label" => trans('influencer::social.label.geographic'), "placeholder" => trans('influencer::social.placeholder.geographic'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'country' => [ "type" => 'text', "label" => trans('influencer::social.label.country'), "placeholder" => trans('influencer::social.placeholder.country'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'price_range' => [ "type" => 'numeric', "label" => trans('influencer::social.label.price_range'), "placeholder" => trans('influencer::social.placeholder.price_range'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }