Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Xoa == 1) {
         $danhmucdomat = Danhmucdomat::findOrFail($id);
         $danhmucdomat->delete();
         return \Redirect::route('danhmucdomat.index')->with('message', 'Xóa Thành Công!');
     } else {
         return \Redirect::route('danhmucdomat.index')->with('message-error', 'Không có quyền truy cập');
     }
 }