Esempio n. 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $apk = Apk::findOrFail($id);
     $path = base_path() . '/storage/apk/' . $apk->pkgname;
     \File::deleteDirectory($path);
     $apk->delete();
     Session::flash('flash_class', 'alert-success');
     Session::flash('flash_message', 'Apk successfully deleted.');
     return redirect()->route("apk.index");
 }