Skip to content

Building a Basic API Tutorial Part 2

Craig Smith edited this page Dec 19, 2019 · 9 revisions

Setting up or first api endpoints

In this section we are going to setup our first api endpoints - boilerplating them quickely, we will then later look at securing and adding additional methodology:

  1. install the api controller: composer require phpsa/laravel-api-controller

-- Optionally -- api headers middleware ? 5. Seed admin User 6. Oauth + Secrets 7. Setup in postman (optinally extra postman package to get initial api points) 8. Install api-controller package.

---- End Part 1

--- start Part 2

    • setup Users Endpoint to map to users model
    • add Policy for security
    • Add Resource for response
    • Add Request for Validation
    • Add Scope for extra scope
  1. by this point should have a basic CRUD group.
  2. -- Custom Endpoint -- Me - for own profile

--- end Part 2

--- start part 3 (advanced extras)

  1. -- joins

Clone this wiki locally