Skip to content
RESTfull Web Service with PHP micro framework [slim 3]
PHP HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
booting
database
docs
resources
vendor
.htaccess
LICENSE
README.md
about.txt
composer.json
composer.lock
index.php

README.md

A-rest Repo

REST Service with Slim Micro Framework


Library

  1. Eloquent - ORM DB
  2. Twig - Template
  3. Respect Validation - Validation
  4. PHPMailer - Mailler

Config

Import database
    |--- /database/asmith_rest.sql
App config
    |--- /app/config/settings.php
    |--- /app/config/dependencies.php
Email
    Custom email body
        |--- /resources/view/email/template.twig

Folder and file

root |
     |---App |--/Config
     |       |--/Controllers
     |       |--/Mailer
     |       |--/Middleware
     |       |--/Models
     |       |--/Validation
     |       |
     |       |-------routes.php
     |
     |---Booting
     |      |---app.php
     |
     |---Vendor
     |      |---composer
     |      |---container-interop
     |      |---doctrine
     |      |---illuminate
     |      |---nesbot
     |      |---nikic
     |      |---phpmailer
     |      |---pimple
     |      |---psr
     |      |---respect
     |      |---slim
     |      |---symfony
     |      |---twig
     |      |-----autoload.php
     |-----index.php
     |-----.htaccess

Test Api

Your can see on routes.php for more api links

link test API sample data crud
   1. View/Navigation - base_url/example
   2. all data   - base_url/example/api/v1/datas
   3. data with id - base_url/example/api/v1/data/{id}
   4. add data - base_url/example/api/v1/create/data
        you need name or other of "data" as a parameter
   5. Update data - base_url/example/api/v1/update/data
        update data you need "data" and "id" as a parameter
   6. Delete data - base_url/example/api/v1/delete/data/{id}

link test API Auth (Singin, Singup, Forgot Password. Change Password)
    1. singup - baseu_url/auth/singup
            need  "full_name", "phone", "username", "email", "password" as a parameter
    2. singin - base_url/auth/singin
            need "email", "password" as a parameter
    3. change password - base_url/auth/password/change
            need "old password" dan "new Password" as a parameter
    4. reset password - base_url/auth/password/reset
            need  "email" as a parameter and then you will get an email to reset your password

Default account

Group Email Password
admin mail@asmith.my.id password
member sidia@asmith.my.id password

Example implementation on android app :

TODO

  • Example Crud.
  • Example User Auth.
  • Example LBS.
  • Example E-commerce.
  • Clean up, code style and minor refactor.

License

Copyright 2017-2018 A. A. Sumitro LICENSE

You can’t perform that action at this time.