전체 글 27

Laravel 04. Blade Templete

Blade는 Laravel의 템플릿 엔진입니다. 1. 기본 사용방법 기본위치resources/views 파일 확장자.blade.php 변수의 출력{{ $name }}Lagacy PHP 2. 왜 blade 는 별도의 문법을 가지고 있는가?1) 가독성 PHP BLADE@if($user) @foreach($items as $item) @endforeach@endif 2) HTML 중심 개발 가능마크업 중심협업 쉬움 3) 추가기능- 권한- 데이터가 없을때@auth..@endauth@guest..@endguest@isset($data)..@endisset@forelse($items as $item)..@empty....@endforelse * * * * Huda * * * * 3. 블래이드 ..

카테고리 없음 2026.04.13

Laravel 03. Controller

1. Controller"로직을 처리하는 부분""사용자 요청을 받아 모델(Model)과 상호작용하고, 결과를 뷰(View)나 JSON으로 반환하는 '중간 관리자' 역할을 수행" 1.1 컨트롤러 생성php artisan make:controller PostController# INFO Controller [app/Http/Controllers/PostController.php] created successfully. 생성위치 app/Http/Controllers/PostController.php 1.2 컨트롤러 구조 1.3 Route 와 ControllerRoute::get('/posts', [ShipmentController::class, 'index']); // 목록Route::get('/pos..

카테고리 없음 2026.04.13

Laravel 02. Routing

1. Route1.1 why Route ? PHP 프로젝트에서 우리는 /경로/php파일명을 URL 로 접근할 수 있습니다. /aboutus/aboutus01.php파일/aboutus/aboutus01.php 브라우저 경로http://url.com/aboutus/aboutus01.php 1) 복잡한 URL 을 간결하게 바꿀수 있다.http://teddy.school.com/board/list.php?board_id=study&step=view&bid=23=> http://teddy.school.com/board/study/23 2) 보안을 위해 직접 php 파일에 접근을 차단한다.http://url.com/aboutus.phphttp://url.com/aboutus.blade.php ( x ) ..

카테고리 없음 2026.04.10

Git 번거로움을 덜어주는 계정저장방법

push, pull 할 때 매번 계정과 비번을 입력해주는게 번거롭게 느껴질수 있습니다. 아래와 같이 해주고 나서 한번 인증을 하고 나면 더이상 인증을 거치지 않아도 됩니다. HTTPS 방식을 사용하는 경우 (자격 증명 도우미)git config --global credential.helper store 다만, 보안상 좋은 건 아니겠죠?그래서 일정 시간동안만 유지하게 해주는 방법을 씁니다.## 윈도우git config --global credential.helper wincred# mac git config --global credential.helper osxkeychain 위 설정을 초기화 할때는git config --global --unset credential.helper

카테고리 없음 2026.02.28

[Git 기초 사용법] 수업에서 다루지 않은 유용한 Git 명령

1. 이미 커밋을 했는데 추가 수정사항이 있어 기존 커밋에 포함시키고자 할때 1) 메세지 수정할일 없이 아주 편리하게 git add .git commit --amend --no-edit 2) edit 창이 열리고 메세지 수정이 가능하게 git add .git commit --amend * edit 창이 열리는데 커밋메세지를 수정할 수도 있고 그냥 저장할 수도 있다.* 이때 커밋 해쉬는 변경된다. 2. 이미 푸쉬를 했는데 수정사항을 기존 커밋에 포함시키고자 할때git add .git commit --amendgit push --force 또는git push --force-with-lease 3. 여러번 커밋했을때 커밋 메세지를 합치고 싶을때협업을 하다보면 커밋 메세지를 합쳐 push 해야 할때가 생긴다...