slim 4 , Intelephense
2020.01.17 16:20
Intelephense 를 오해할 뻔 했다.
컴포저로 뭔가를 새로 추가했는데 말을 안들으면 인덱싱만 다시 걸면 된다.
* index.php 생성
http://www.slimframework.com 에서 긁어온다. ( vendor 경로는 알아서 수정한다 )
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
require_once __DIR__ . '/vendor/autoload.php'; // public말고 로컬에서 작업
$app = AppFactory::create();
$app->get('/hello/{name}', function (Request $request, Response $response, array $args) {
$name = $args['name'];
$response->getBody()->write("Hello, $name");
return $response;
});
$app->run();
* 의존성 추가
컴포저로 아래 모듈들을 추가한다.
php .\composer.phar require slim/slim:^4.0
php .\composer.phar require slim/psr7
* 인텔레펜스 인덱싱
vscode에서 아래와 같이 실행
F1 > intelephense: Index workspace
깃헙 : https://github.com/edp1096/hello-slim4
끝.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
21 | nginx site enable | 꿈돌이 | 2024.09.07 | 69 |
20 | slim routeplaceholder | 꿈돌이 | 2020.02.27 | 4285 |
» | slim 4 , Intelephense | 꿈돌이 | 2020.01.17 | 361 |
18 | axios post로 데이터 안 넘어갈 때 체크할 거 | 꿈돌이 | 2018.10.24 | 661 |
17 |
윈도우에서 사설인증서로 https localhost 사용하기
![]() | 꿈돌이 | 2018.08.24 | 328 |
16 | php obfuscator | 꿈돌이 | 2018.01.31 | 266 |
15 | DB 순번 시퀀스 초기화 | 꿈돌이 | 2017.12.25 | 12969 |
14 | Vue.js td내 input 태그에서 v-for | 꿈돌이 | 2017.12.19 | 675 |
13 |
Vue Slim으로 카테고리 만들기
![]() | 꿈돌이 | 2017.11.10 | 297 |
12 | Doctrine DBAL 메모 | 꿈돌이 | 2017.10.27 | 300 |
11 |
Vue Tree view with Single file component
![]() | 꿈돌이 | 2017.09.29 | 433 |
10 | PHP 내장 웹서버 띄우기 | 꿈돌이 | 2017.09.04 | 601 |
9 |
vue-slim-medoo boilerplate
![]() | 꿈돌이 | 2017.06.04 | 326 |
8 |
Vue boilerplate
![]() | 꿈돌이 | 2017.06.02 | 472 |
7 |
Slim boilerplates
![]() | 꿈돌이 | 2017.06.02 | 254 |
6 | Windows에서 Composer로 slim 설치하기 | 꿈돌이 | 2017.06.01 | 616 |
5 | 코드이그나이터 3.1.3에서 HMVC 오류 대응 | 꿈돌이 | 2017.03.01 | 540 |
4 | CodeIgniter - Helper 폐기 항목 | 꿈돌이 | 2016.06.14 | 1260 |
3 | CodeIgniter - Class Libraries 폐기 항목 | 꿈돌이 | 2016.06.14 | 479 |
2 | Windows에서 Composer로 CodeIgniter 설치하기 | 꿈돌이 | 2016.06.06 | 1213 |