GithubHelp home page GithubHelp logo

0xforked / a-rest Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 2.82 MB

RESTfull Web Service with PHP micro framework [slim 3]

Home Page: https://asmith.my.id

License: The Unlicense

PHP 63.39% CSS 1.30% HTML 35.31%
restful-api slim-framework

a-rest's Introduction

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 [email protected] password
member [email protected] 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

a-rest's People

Contributors

aasumitro avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

lupuxyz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.