This is a base project for RESTful api based on Slim 3 framework.
$ composer create-project --no-interaction --stability=dev ikaler/slim3-api-base my-slim-api
Replace my-slim-api
with the desired directory name for your new application.
$ cd my-slim-api
or the name you provided above$ cp app/config_default.php app/config.php
$ mkdir logs
$ touch logs/app.log
app
: Application codelogs
: Log filespublic
: Webserver rootvendor
: Composer dependencies
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`email` varchar(30) NOT NULL,
`password` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Added few sample files UserController.php
, UserModel.php
to get started.