This is simple CRUD API with slim framework.
- PHP 7.0 or higher
- Composer
- MySQL 5.6 / MariaDB 10.0 or higher for spatial features in MySQL
- Postman
For local development you may run PHP's built-in web server:
php -S localhost:1234
Test the script by opening the following URL:
http://localhost:1234
If you wanna use postman, import this collection :
crud-api-slim-php.postman_collection.json
Don't forget to modify the configuration at the bottom of the file.
Edit the following lines in the bottom of the file "config/settings.php
":
<?php
return [
"settings" => [
"displayErrorDetails" => TRUE,
"db" => [
"driver" => 'mysql',
"host" => 'localhost',
"username" => 'root',
"password" => '',
"database" => 'crud-api-slim-php',
"charset" => 'utf8',
"collation" => 'utf8_unicode_ci',
"prefix" => ''
]
]
];
?>
Copyright 2019 by Muhammad Cholis Malik [email protected]