feat: [google-cloud] AI 활용 가이드 PPTX 다운로드 기능 추가

- AiGuideController에 download() 메서드 추가
- AI 활용 가이드 PPTX 다운로드 라우트 추가
- 뷰에 PPTX 다운로드 버튼 추가
- 7장 슬라이드 HTML → PPTX 변환 파일 포함
This commit is contained in:
김보곤
2026-03-02 15:15:06 +09:00
parent 411f4a596c
commit 458e5f890a
4 changed files with 18 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class AiGuideController extends Controller
{
@@ -17,4 +18,13 @@ public function index(Request $request): View|Response
return view('google-cloud.ai-guide.index');
}
public function download(): BinaryFileResponse
{
$path = public_path('downloads/google-cloud-ai-guide.pptx');
abort_unless(file_exists($path), 404, 'PPTX 파일을 찾을 수 없습니다.');
return response()->download($path, 'Google_Cloud_AI_활용가이드.pptx');
}
}

Binary file not shown.

View File

@@ -37,6 +37,12 @@
</div>
<div class="flex items-center gap-3">
<span class="text-xs text-gray-400">CodeBridgeX | 2026.03</span>
<a href="{{ route('google-cloud.ai-guide.download') }}"
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 transition-colors"
title="PPTX 다운로드">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
PPTX
</a>
</div>
</div>

View File

@@ -761,6 +761,8 @@
Route::get('/ai-guide', [GoogleCloudAiGuideController::class, 'index'])
->name('ai-guide.index');
Route::get('/ai-guide/download', [GoogleCloudAiGuideController::class, 'download'])
->name('ai-guide.download');
});
/*