/** * Receive Model Entry Delete Post Data, validate it and return user. * * @param int $modelitemId * * @return \Illuminate\Http\RedirectResponse */ public function postDelete($modelitemId) { if (!$this->modelAdmin->hasDeleting()) { return $this->missingMethod(); } $this->modelAdmin->delete($modelitemId); return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully removed.', 'dismissable' => false]]); }