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) {
         $danhmucemail = Danhmucemail::findOrFail($id);
         $danhmucemail->delete();
         return \Redirect::route('danhmucemail.index')->with('message', 'Xóa thành công!');
     } else {
         return \Redirect::route('danhmucemail.index')->with('message-error', 'Không có quyền truy cập');
     }
 }