ikaler / slim3-api-base
Slim 3 based Restful api base project.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ikaler/slim3-api-base
Requires
- monolog/monolog: ^1.22
- slim/slim: ^3.0
Requires (Dev)
- phpunit/phpunit: 5.7.*
This package is not auto-updated.
Last update: 2025-11-09 02:28:05 UTC
README
This is a base project for RESTful api based on Slim 3 framework.
Create project:
$ 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.
Configure project:
$ cd my-slim-apior the name you provided above$ cp app/config_default.php app/config.php$ mkdir logs$ touch logs/app.log
Directories
app: Application codelogs: Log filespublic: Webserver rootvendor: Composer dependencies
Sample User table
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.