controller refactoring part 24

This commit is contained in:
Peter Papp
2021-07-21 18:14:23 +02:00
parent 91cb795054
commit 54f1f4c9a8
18 changed files with 136 additions and 138 deletions
@@ -1,12 +1,9 @@
<?php
namespace Domain\Settings\Controllers;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
class GetIAppController
{
@@ -15,8 +12,7 @@ class GetIAppController
*/
public function __invoke(
string $basename
): StreamedResponse|FileNotFoundException {
): StreamedResponse | FileNotFoundException {
// Check if file exist
if (! Storage::exists("/system/$basename")) {
abort(404);
@@ -25,4 +21,4 @@ class GetIAppController
// Return avatar
return Storage::download("/system/$basename", $basename);
}
}
}