/**
  * Ajax delete
  * @param $id
  */
 public function delete($id)
 {
     if (!$this->objLoggedInUser->HasPermission('Edit/Documents')) {
         abort('404');
     }
     if (\App\Document::destroy($id)) {
         exit('success');
     }
     exit('error');
 }
Exemple #2
0
 /**
  * Delete the given Document.
  *
  * @param  int      $id
  * @return Redirect
  */
 public function getDelete($id = null)
 {
     $document = Document::destroy($id);
     // Redirect to the group management page
     return redirect('admin/documents')->with('success', Lang::get('message.success.delete'));
 }