Skip to content

Latest commit

 

History

History
107 lines (89 loc) · 3.5 KB

README.md

File metadata and controls

107 lines (89 loc) · 3.5 KB

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