Skip to content

Commit

Permalink
feat: change download new version foody
Browse files Browse the repository at this point in the history
  • Loading branch information
amrron committed Nov 7, 2024
1 parent bd15580 commit a5dc538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions app/Http/Controllers/ReleaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,10 @@ public function latest() {
'data' => new ReleaseResource($release)
]);
}

public function download() {
$release = Release::latest()->first();

return redirect($release->url);
}
}
4 changes: 1 addition & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@

});

Route::get('/download', function(){
return response()->download(public_path("/app/Foody.apk"));
});
Route::get('/download', [ReleaseController::class, 'download'])->name('download');

0 comments on commit a5dc538

Please sign in to comment.