File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ public function index()
1414
1515 if (\Input::get ('dl ' )) {
1616 return \Response::download (storage_path () . '/logs/ ' . base64_decode (\Input::get ('dl ' )));
17+ } elseif (\Input::has ('del ' )) {
18+ \File::delete (storage_path () . '/logs/ ' . base64_decode (\Input::get ('del ' )));
19+ return \Redirect::to (\Request::url ());
1720 }
1821
1922 $ logs = LaravelLogViewer::all ();
Original file line number Diff line number Diff line change 9494 @endif
9595 <div >
9696 <a href =" ?dl={{ base64_encode ($current_file ) } }" ><span class =" glyphicon glyphicon-download-alt" ></span > Download file</a >
97+ -
98+ <a id =" delete-log" href =" ?del={{ base64_encode ($current_file ) } }" ><span class =" glyphicon glyphicon-trash" ></span > Delete file</a >
9799 </div >
98100 </div >
99101 </div >
119121 $ (' .table-container' ).on (' click' , ' .expand' , function (){
120122 $ (' #' + $ (this ).data (' display' )).toggle ();
121123 });
124+ $ (' #delete-log' ).click (function (){
125+ return confirm (' Are you sure?' );
126+ });
122127 });
123128 </script >
124129 </body >
You can’t perform that action at this time.
0 commit comments