Esempio n. 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $data = Upload::find($id);
     if ($data->delete()) {
         return response()->json(array('success' => TRUE, 'msg' => 'Data Berhasil Dihapus'));
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     // File Delete By Agus Cahyono
     $file_lama = DB::table('tbl_download')->select('nama_file')->where('id_download', $id)->first();
     File::delete('upload/file/' . $file_lama->nama_file);
     $data = Upload::find($id);
     if ($data->delete()) {
         return response()->json(array('success' => TRUE, 'msg' => 'Data Berhasil Dihapus'));
     }
 }
Esempio n. 3
0
 public function actionInform()
 {
     $upload = Upload::find()->orderBy(['id' => SORT_DESC])->all();
     return $this->render('inform', ['upload' => $upload]);
 }