public function destroy($id)
{
$uri1 = \Request::decodedPath();
$xuri = explode('/', $uri1, -1);
$uri = join('/', $xuri);
$id = str_replace($uri . '/', '', $uri1);
$this->entity->uri = $uri;
$this->entity->action = 'delete';
$this->entity->ids = $id;
$run = $this->run();
if ($run !== true and $run !== false) {
return $run;
}
if ($run === false) {
if ($this->entity->errorText === null) {
$this->entity->errorText = 'no message';
}
return $this->error();
}
$this->execute();
if ($this->entity->abort === true) {
return $this->error();
}
$this->getResponse();
return Redirect::back()->with('message', 'Data berhasil di hapus.');
}