Skip to content

Commit 8236f17

Browse files
authored
added flight framework (#8281)
1 parent 9e66430 commit 8236f17

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

php/flight/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"flightphp/core": "^3.14"
4+
}
5+
}

php/flight/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
framework:
2+
website: docs.flightphp.com
3+
version: 3.14

php/flight/public/index.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
require '../vendor/autoload.php';
4+
5+
Flight::route(
6+
'GET /',
7+
function () {
8+
echo '';
9+
}
10+
);
11+
12+
Flight::route(
13+
'GET /user/@id',
14+
function ($id) {
15+
echo $id;
16+
}
17+
);
18+
19+
Flight::route(
20+
'POST /user',
21+
function () {
22+
echo '';
23+
}
24+
);
25+
26+
Flight::start();

0 commit comments

Comments
 (0)