예제 #1
0
 /**
  * Delete the log.
  *
  * @param string $date
  *
  * @return \Illuminate\Http\Response
  */
 public function getDelete($date)
 {
     try {
         LogViewer::delete($date);
         $today = Carbon::today()->format('Y-m-d');
         return Redirect::to('logviewer/' . $today . '/all')->with('success', 'Log deleted successfully!');
     } catch (\Exception $e) {
         return Redirect::to('logviewer/' . $date . '/all')->with('error', 'There was an error while deleting the log.');
     }
 }
예제 #2
0
 /**
  * Delete the lumen.log.
  *
  * @param string $date
  *
  * @return \Illuminate\Http\Response
  */
 public function getLumenDelete($date = 'lumen')
 {
     try {
         LogViewer::delete($date);
         return redirect()->route('logviewer.lumen.show')->with('success', 'Log deleted successfully!');
     } catch (\Exception $e) {
         return redirect()->route('logviewer.lumen.show')->with('error', 'There was an error while deleting the log.');
     }
 }