Rens Blog

Personal Records to Record Learning Processes and Outcomes

Laravel Auth API
19 December 2024 | 40 views

Laravel Auth API

Web Programming

Web API (Web Application Programming Interface) is an interface that enables communication between different applications or systems over a network, usually the Internet. Web APIs allow applications to request data or services from other applications via the HTTP protocol.

Web APIs are often used in modern software development for:

Retrieve Data: Such as weather, news, user data, etc.
Interacting with External Services: For example, online payments or authentication through Google or Facebook.
Connecting Different Applications: An intermediary connects the front end (user interface) and back end (server).

 https://github.com/rendyokts/laravel-auth-api.git

How to use this API

  1. Clone the repository
  2. Add a .env file and set the name of the database
  3. Run this composer update in your terminal
  4. Run this php artisan migrate
  5. Then open your Postman or Insomnia apps
  6. Access the URL in your local e.g http://127.0.0.1:8000
  7. Add Route in the URL http://127.0.0.1:8000/api/register to register your credentials
  8. Check your Login http:://127.0.0.1:8000/api/login
  9. In your postman use Json Body and input this

{
  "name":"YourName",
  "email":"YourEmail@email.com",
  "password":"YourSecurePassword",
  "confirm_password":"YourSecureSamePassword"
}

Cari