Skip to content

Commit c6c2369

Browse files
committed
Feat 사이드바,버저닝,검색 기능 추가
1 parent 34218ca commit c6c2369

File tree

15 files changed

+1071
-29
lines changed

15 files changed

+1071
-29
lines changed

docs/architecture/container.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# 서비스 컨테이너 (12.x 버전)
6+
7+
## 소개
8+
9+
Laravel 12.x의 서비스 컨테이너는 클래스 의존성을 관리하는 강력한 도구입니다. 의존성 주입은 본질적으로 클래스 의존성이 생성자나 setter 메소드를 통해 "주입"되는 것을 의미합니다.
10+
11+
:::note 버전 정보
12+
이 문서는 Laravel 12.x 버전에 대한 내용입니다.
13+
:::
14+
15+
## 바인딩
16+
17+
Laravel 12.x에서 서비스 컨테이너에 바인딩하는 방법에는 여러 가지가 있습니다.
18+
19+
```php
20+
// 기본 바인딩
21+
$this->app->bind('HelpSpot\API', function ($app) {
22+
return new \HelpSpot\API($app->make('HttpClient'));
23+
});
24+
25+
// 싱글톤 바인딩
26+
$this->app->singleton('HelpSpot\API', function ($app) {
27+
return new \HelpSpot\API($app->make('HttpClient'));
28+
});
29+
30+
// 12.x에서 추가된 새로운 바인딩 방법
31+
$this->app->scoped('HelpSpot\API', function ($app) {
32+
return new \HelpSpot\API($app->make('HttpClient'));
33+
});
34+
```
35+
36+
## 의존성 해결
37+
38+
```php
39+
// 12.x에서는 생성자 프로퍼티 프로모션 기능 지원
40+
public function __construct(
41+
private readonly UserRepository $users,
42+
private readonly Logger $logger,
43+
) {}
44+
```
45+
46+
## 12.x에서의 변경 사항
47+
48+
Laravel 12.x에서는 서비스 컨테이너에 다음과 같은 새로운 기능이 추가되었습니다:
49+
50+
- 더 효율적인 의존성 해결 알고리즘
51+
- 개선된 컨테이너 이벤트 시스템
52+
- 타입 힌팅을 활용한 더 정확한 의존성 주입
53+
- 새로운 스코프드 서비스 등록 방식
54+
55+
추후 더 자세한 내용이 추가될 예정입니다.

docs/architecture/lifecycle.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# 요청 라이프사이클 (12.x 버전)
6+
7+
## 소개
8+
9+
Laravel 12.x 애플리케이션에서 HTTP 요청이 처리되는 과정을 이해하는 것은 중요합니다. 이 문서에서는 Laravel 12.x의 요청 라이프사이클에 대해 설명합니다.
10+
11+
:::note 버전 정보
12+
이 문서는 Laravel 12.x 버전에 대한 내용입니다.
13+
:::
14+
15+
## 라이프사이클 개요
16+
17+
1. 모든 요청은 `public/index.php` 파일로 들어옵니다.
18+
2. 오토로더가 로드됩니다.
19+
3. 프레임워크의 인스턴스가 생성됩니다.
20+
4. 요청이 처리됩니다.
21+
5. 응답이 반환됩니다.
22+
23+
## 12.x에서의 변경 사항
24+
25+
Laravel 12.x에서는 라이프사이클 처리 과정이 완전히 재작성되어 더 빠르고 효율적인 처리가 가능해졌습니다. 주요 변경 사항은 다음과 같습니다:
26+
27+
- 새로운 애플리케이션 부트스트랩 프로세스
28+
- 더 효율적인 서비스 컨테이너 처리
29+
- 개선된 예외 처리 메커니즘
30+
31+
## 자세한 설명
32+
33+
추후 더 자세한 내용이 추가될 예정입니다.

docs/basics/routing.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# 라우팅 (12.x 버전)
6+
7+
## 기본 라우팅
8+
9+
:::note 버전 정보
10+
이 문서는 Laravel 12.x 버전에 대한 내용입니다.
11+
:::
12+
13+
가장 기본적인 Laravel 12.x 라우트는 URI와 클로저를 허용하여 매우 간단한 방법으로 경로를 정의할 수 있습니다:
14+
15+
```php
16+
Route::get('/greeting', function () {
17+
return 'Hello World';
18+
});
19+
```
20+
21+
## 사용 가능한 라우터 메소드
22+
23+
Laravel 12.x 라우터는 다음 HTTP 메소드에 대응하는 라우트를 등록할 수 있습니다:
24+
25+
```php
26+
Route::get($uri, $callback);
27+
Route::post($uri, $callback);
28+
Route::put($uri, $callback);
29+
Route::patch($uri, $callback);
30+
Route::delete($uri, $callback);
31+
Route::options($uri, $callback);
32+
```
33+
34+
## 라우트 파라미터
35+
36+
```php
37+
Route::get('/user/{id}', function ($id) {
38+
return 'User '.$id;
39+
});
40+
```
41+
42+
## 12.x에서의 변경 사항
43+
44+
Laravel 12.x에서는 라우팅 시스템에 다음과 같은 새로운 기능이 추가되었습니다:
45+
46+
### Folio 페이지 기반 라우팅
47+
48+
Laravel 12.x에서는 파일 기반 라우팅을 위한 Folio 패키지가 기본으로 포함되어 있습니다:
49+
50+
```php
51+
// resources/views/pages/about-us.blade.php 파일이 자동으로 /about-us 경로로 라우팅됩니다
52+
```
53+
54+
### 개선된 라우트 그룹핑
55+
56+
```php
57+
Route::prefix('admin')->middleware(['auth', 'admin'])->group(function () {
58+
Route::get('/dashboard', function () {
59+
// /admin/dashboard에 대한 처리
60+
});
61+
62+
Route::get('/users', function () {
63+
// /admin/users에 대한 처리
64+
});
65+
});
66+
```
67+
68+
추후 더 자세한 내용이 추가될 예정입니다.

docs/intro.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,27 @@
22
sidebar_position: 1
33
---
44

5-
# Laravel 소개
5+
# Laravel 소개 (12.x 버전)
66

77
Laravel은 웹 애플리케이션 개발을 위한 접근성, 강력함, 그리고 유연성을 제공하는 웹 애플리케이션 프레임워크입니다. 우아한 문법을 가진 Laravel은 우리가 창의성을 표현하고 즐겁게 작업할 수 있도록 도와줍니다. 이것이 바로 Laravel의 철학입니다.
88

9+
:::note 버전 정보
10+
이 문서는 Laravel 12.x 버전에 대한 내용입니다.
11+
:::
12+
913
## 시작하기
1014

11-
Laravel 설치 및 기본 사용법에 대해 알아보세요.
15+
Laravel 12.x 설치 및 기본 사용법에 대해 알아보세요.
1216

1317
```bash
14-
composer create-project laravel/laravel example-app
18+
composer create-project laravel/laravel example-app "12.*"
1519
cd example-app
1620
php artisan serve
1721
```
1822

1923
## 주요 기능
2024

21-
Laravel은 다음과 같은 강력한 기능을 제공합니다:
25+
Laravel 12.x는 다음과 같은 강력한 기능을 제공합니다:
2226

2327
- 강력한 라우팅 시스템
2428
- 블레이드 템플릿 엔진
@@ -28,6 +32,16 @@ Laravel은 다음과 같은 강력한 기능을 제공합니다:
2832
- 이벤트 및 큐 시스템
2933
- 테스팅 지원
3034

35+
## 12.x의 새로운 기능
36+
37+
Laravel 12.x에서는 다음과 같은 새로운 기능이 추가되었습니다:
38+
39+
- 완전히 새로워진 파일 구조
40+
- 향상된 성능과 최적화
41+
- 더 강력한 타입 힌팅 지원
42+
- 새로운 Folio 페이지 기반 라우팅
43+
- 개선된 Pest 테스팅 통합
44+
3145
## 더 알아보기
3246

3347
Laravel의 공식 문서를 통해 더 많은 정보를 얻을 수 있습니다.

docusaurus.config.js

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,29 @@ const config = {
2222
organizationName: 'letsescape', // Usually your GitHub org/user name.
2323
projectName: 'laravel-docs-web', // Usually your repo name.
2424

25-
onBrokenLinks: 'throw',
25+
onBrokenLinks: 'warn',
2626
onBrokenMarkdownLinks: 'warn',
2727

2828
// Even if you don't use internalization, you can use this field to set useful
2929
// metadata like html lang. For example, if your site is Chinese, you may want
3030
// to replace "en" with "zh-Hans".
3131
i18n: {
3232
defaultLocale: 'ko',
33-
locales: ['ko'],
33+
locales: ['ko', 'en'],
3434
},
3535

36+
themes: [
37+
[
38+
require.resolve("@easyops-cn/docusaurus-search-local"),
39+
{
40+
hashed: true,
41+
language: ["en", "ko"],
42+
highlightSearchTermsOnTargetPage: true,
43+
explicitSearchResultPath: true,
44+
},
45+
],
46+
],
47+
3648
presets: [
3749
[
3850
'classic',
@@ -44,14 +56,22 @@ const config = {
4456
// Remove this to remove the "edit this page" links.
4557
editUrl:
4658
'https://github.com/letsescape/laravel-docs-web/tree/main/',
59+
routeBasePath: 'docs',
60+
includeCurrentVersion: true,
61+
lastVersion: 'current',
62+
versions: {
63+
current: {
64+
label: '12.x',
65+
path: '',
66+
},
67+
'11.x': {
68+
label: '11.x',
69+
path: '11.x',
70+
},
71+
},
72+
// remarkPlugins 설정 제거
4773
},
48-
blog: {
49-
showReadingTime: true,
50-
// Please change this to your repo.
51-
// Remove this to remove the "edit this page" links.
52-
editUrl:
53-
'https://github.com/letsescape/laravel-docs-web/tree/main/',
54-
},
74+
blog: false,
5575
theme: {
5676
customCss: require.resolve('./src/css/custom.css'),
5777
},
@@ -77,7 +97,17 @@ const config = {
7797
position: 'left',
7898
label: '문서',
7999
},
80-
{to: '/blog', label: '블로그', position: 'left'},
100+
// 블로그 기능 비활성화
101+
{
102+
type: 'docsVersionDropdown',
103+
position: 'right',
104+
dropdownItemsAfter: [],
105+
dropdownActiveClassDisabled: true,
106+
},
107+
{
108+
type: 'localeDropdown',
109+
position: 'right',
110+
},
81111
{
82112
href: 'https://github.com/letsescape/laravel-docs-web',
83113
label: 'GitHub',
@@ -109,10 +139,7 @@ const config = {
109139
{
110140
title: '더 보기',
111141
items: [
112-
{
113-
label: '블로그',
114-
to: '/blog',
115-
},
142+
// 블로그 기능 비활성화
116143
{
117144
label: 'GitHub',
118145
href: 'https://github.com/letsescape/laravel-docs-web',
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version.label": {
3+
"message": "12.x",
4+
"description": "The label for version current"
5+
}
6+
}

0 commit comments

Comments
 (0)