diff --git a/app/Http/Controllers/Public/QrScanController.php b/app/Http/Controllers/Public/QrScanController.php index f914722..849499d 100644 --- a/app/Http/Controllers/Public/QrScanController.php +++ b/app/Http/Controllers/Public/QrScanController.php @@ -254,36 +254,6 @@ class QrScanController extends Controller return Storage::disk('qr')->response($path); } - public function menuLogo(string $shortCode): StreamedResponse - { - $qrCode = QrCode::query() - ->where('short_code', $shortCode) - ->where('is_active', true) - ->firstOrFail(); - - abort_unless($qrCode->type === QrCode::TYPE_SHOP, 404); - - $path = $qrCode->content()['logo_path'] ?? null; - abort_unless($path && Storage::disk('qr')->exists($path), 404); - - return Storage::disk('qr')->response($path); - } - - public function menuCover(string $shortCode): StreamedResponse - { - $qrCode = QrCode::query() - ->where('short_code', $shortCode) - ->where('is_active', true) - ->firstOrFail(); - - abort_unless($qrCode->type === QrCode::TYPE_SHOP, 404); - - $path = $qrCode->content()['cover_path'] ?? null; - abort_unless($path && Storage::disk('qr')->exists($path), 404); - - return Storage::disk('qr')->response($path); - } - public function paymentLogo(string $shortCode): StreamedResponse { return $this->serveContentImage($shortCode, QrCode::TYPE_PAYMENT, 'logo_path'); diff --git a/app/Models/QrCode.php b/app/Models/QrCode.php index 04a3b79..4afad66 100644 --- a/app/Models/QrCode.php +++ b/app/Models/QrCode.php @@ -19,7 +19,6 @@ class QrCode extends Model public const TYPE_IMAGE = 'image'; public const TYPE_SHOP = 'shop'; public const TYPE_MENU = 'menu'; - public const TYPE_SHOP = 'shop'; public const TYPE_APP = 'app'; public const TYPE_BOOKING = 'booking'; /** @deprecated Legacy ebook type — migrated to {@see TYPE_BOOKING} */