updadte: subtitle controller

- increment downloads counter
This commit is contained in:
HDVinnie
2020-03-29 22:20:52 -04:00
parent df65a21c07
commit 0b779484e9
@@ -162,6 +162,10 @@ class SubtitleController extends Controller
// Place temp file
file_put_contents(public_path().'/files/tmp/'.$temp_filename, $subtitle_file);
// Increment doownloads count
$subtitle->downloads = ++$subtitle->downloads;
$subtitle->save();
return response()->download(public_path('files/tmp/'.$temp_filename))->deleteFileAfterSend(true);
}
}