(It doesn't have a goal to be usable for real, it's only for learning purposes)
Only compatible with php >8.0
First, need to do a composer install
.
- app - Contains Controllers and Models.
- controllers - The Controller is usually called by your Routes.
- models - Contains the Database logic for a table mostly called by Controller to get database informations or specific class methods.
- core - The core files of the framework.
- public - Where the magic is done.
- routes - Contain your routes, linked either to a function or a Closure.
- database - Contains migrations/ folder in which we can store the SQL files to migrate
Is called with php manager
-
It's a kind of artisan like laravel uses, you can generate Models or Controllers (more to come).
The prototype is as followed :
php manager @action @args[]
Controller and Model commands automatically extends to default, a way to override will be done later.
To create a new Controller
php manager controller UserController
To create a new Model
php manager model User
To add multiple routes to api.php at once (the method argument is case insensitive)
php manager route add GET,/home POST,/register,RegisterController@execute
To create a token if authKey is activated, if it worked, token will be output in CLI
php manager authKey create
You can use php manager
to have a list of all possible commands.
run php vendor\codeception\codeception\codecept run
More tests can be added for new API routes into file test/ApiCest.php