Skip to content
taka512 edited this page Jan 18, 2018 · 4 revisions

slimフレームワークのあれこれ

公式
https://www.slimframework.com/

インストール

php composer.phar create-project slim/slim-skeleton sample_slim

2. twigを使う

tips

404ステータスで文字列表示

$app->get('/', function ($request, $response, $args) {
    return $response->withStatus(200)->write('Hello World!');
});

404リダイレクト

Clone this wiki locally