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' => [ 'rtknr' => [ "type" => 'text', "label" => trans('raisen::office.label.rtknr'), "placeholder" => trans('raisen::office.placeholder.rtknr'), "rules" => 'required', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('raisen::office.label.name'), "placeholder" => trans('raisen::office.placeholder.name'), "rules" => 'required', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'street' => [ "type" => 'text', "label" => trans('raisen::office.label.street'), "placeholder" => trans('raisen::office.placeholder.street'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'address' => [ "type" => 'text', "label" => trans('raisen::office.label.address'), "placeholder" => trans('raisen::office.placeholder.address'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'place' => [ "type" => 'text', "label" => trans('raisen::office.label.place'), "placeholder" => trans('raisen::office.placeholder.place'), "rules" => 'required', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pincode' => [ "type" => 'text', "label" => trans('raisen::office.label.pincode'), "placeholder" => trans('raisen::office.placeholder.pincode'), "rules" => 'required', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'mobile' => [ "type" => 'text', "label" => trans('raisen::office.label.mobile'), "placeholder" => trans('raisen::office.placeholder.mobile'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'phone' => [ "type" => 'text', "label" => trans('raisen::office.label.phone'), "placeholder" => trans('raisen::office.placeholder.phone'), "rules" => 'required', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'fax' => [ "type" => 'text', "label" => trans('raisen::office.label.fax'), "placeholder" => trans('raisen::office.placeholder.fax'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'email', "label" => trans('raisen::office.label.email'), "placeholder" => trans('raisen::office.placeholder.email'), "rules" => 'required', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'website' => [ "type" => 'url', "label" => trans('raisen::office.label.website'), "placeholder" => trans('raisen::office.placeholder.website'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'logo' => [ "type" => 'image', "label" => trans('raisen::office.label.logo'), "placeholder" => trans('raisen::office.placeholder.logo'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lat' => [ "type" => 'decimal', "label" => trans('raisen::office.label.lat'), "placeholder" => trans('raisen::office.placeholder.lat'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'lng' => [ "type" => 'decimal', "label" => trans('raisen::office.label.lng'), "placeholder" => trans('raisen::office.placeholder.lng'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }