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('admission::admission.label.name'), "placeholder" => trans('admission::admission.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'initials' => [ "type" => 'text', "label" => trans('admission::admission.label.initials'), "placeholder" => trans('admission::admission.placeholder.initials'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'text', "label" => trans('admission::admission.label.gender'), "placeholder" => trans('admission::admission.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'age' => [ "type" => 'numeric', "label" => trans('admission::admission.label.age'), "placeholder" => trans('admission::admission.placeholder.age'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('admission::admission.label.dob'), "placeholder" => trans('admission::admission.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'religion' => [ "type" => 'text', "label" => trans('admission::admission.label.religion'), "placeholder" => trans('admission::admission.placeholder.religion'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'caste' => [ "type" => 'text', "label" => trans('admission::admission.label.caste'), "placeholder" => trans('admission::admission.placeholder.caste'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'qualifying_exam' => [ "type" => 'text', "label" => trans('admission::admission.label.qualifying_exam'), "placeholder" => trans('admission::admission.placeholder.qualifying_exam'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'year_of_passing' => [ "type" => 'date_picker', "label" => trans('admission::admission.label.year_of_passing'), "placeholder" => trans('admission::admission.placeholder.year_of_passing'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'institution' => [ "type" => 'text', "label" => trans('admission::admission.label.institution'), "placeholder" => trans('admission::admission.placeholder.institution'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'parent_name' => [ "type" => 'text', "label" => trans('admission::admission.label.parent_name'), "placeholder" => trans('admission::admission.placeholder.parent_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'relationship' => [ "type" => 'text', "label" => trans('admission::admission.label.relationship'), "placeholder" => trans('admission::admission.placeholder.relationship'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('admission::admission.label.phone'), "placeholder" => trans('admission::admission.placeholder.phone'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('admission::admission.label.mobile'), "placeholder" => trans('admission::admission.placeholder.mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'occupation' => [ "type" => 'text', "label" => trans('admission::admission.label.occupation'), "placeholder" => trans('admission::admission.placeholder.occupation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'textarea', "label" => trans('admission::admission.label.address'), "placeholder" => trans('admission::admission.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'main_subject' => [ "type" => 'text', "label" => trans('admission::admission.label.main_subject'), "placeholder" => trans('admission::admission.placeholder.main_subject'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'marks' => [ "type" => 'textarea', "label" => trans('admission::admission.label.marks'), "placeholder" => trans('admission::admission.placeholder.marks'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'course' => [ "type" => 'text', "label" => trans('admission::admission.label.course'), "placeholder" => trans('admission::admission.placeholder.course'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'sslc_details' => [ "type" => 'text', "label" => trans('admission::admission.label.sslc_details'), "placeholder" => trans('admission::admission.placeholder.sslc_details'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'medium_of_instruction' => [ "type" => 'text', "label" => trans('admission::admission.label.medium_of_instruction'), "placeholder" => trans('admission::admission.placeholder.medium_of_instruction'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'second_laguage' => [ "type" => 'text', "label" => trans('admission::admission.label.second_laguage'), "placeholder" => trans('admission::admission.placeholder.second_laguage'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'photo' => [ "type" => 'image', "label" => trans('admission::admission.label.photo'), "placeholder" => trans('admission::admission.placeholder.photo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'files' => [ "type" => 'files', "label" => trans('admission::admission.label.files'), "placeholder" => trans('admission::admission.placeholder.files'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }