/** * Get the value of an attribute for the field. * * @param string $name * * @return mixed */ private function getValue($name) { if (!$name) { return; } return $this->modelManager->getAttribute($name); }
/** * Clone a Page. * * @param int $modelitemId * * @return \Illuminate\Http\Response */ public function getClone($modelitemId) { if (!$this->modelAdmin->hasCloning()) { return $this->missingMethod(); } $this->modelAdmin->clone($modelitemId); return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully cloned.', 'dismissable' => false]]); }