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' => [ 'type' => [ "type" => 'text', "label" => trans('notification::notification.label.type'), "placeholder" => trans('notification::notification.placeholder.type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notifiable_id' => [ "type" => 'numeric', "label" => trans('notification::notification.label.notifiable_id'), "placeholder" => trans('notification::notification.placeholder.notifiable_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'notifiable_type' => [ "type" => 'text', "label" => trans('notification::notification.label.notifiable_type'), "placeholder" => trans('notification::notification.placeholder.notifiable_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'data' => [ "type" => 'text', "label" => trans('notification::notification.label.data'), "placeholder" => trans('notification::notification.placeholder.data'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'message' => [ "type" => 'text', "label" => trans('notification::notification.label.message'), "placeholder" => trans('notification::notification.placeholder.message'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'card_variant' => [ "type" => 'text', "label" => trans('notification::notification.label.card_variant'), "placeholder" => trans('notification::notification.placeholder.card_variant'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'pinned' => [ "type" => 'numeric', "label" => trans('notification::notification.label.pinned'), "placeholder" => trans('notification::notification.placeholder.pinned'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'read_at' => [ "type" => 'date_time_picker', "label" => trans('notification::notification.label.read_at'), "placeholder" => trans('notification::notification.placeholder.read_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'done_at' => [ "type" => 'date_time_picker', "label" => trans('notification::notification.label.done_at'), "placeholder" => trans('notification::notification.placeholder.done_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'saved_at' => [ "type" => 'date_time_picker', "label" => trans('notification::notification.label.saved_at'), "placeholder" => trans('notification::notification.placeholder.saved_at'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }