Skip to content

tareq1988/lumen-starter

Repository files navigation

Lumen Starter

A starter package to use it with Vue Lumen Starter.

Packages Added

Installation

  1. Clone the repository: git clone https://github.com/tareq1988/lumen-starter.git
  2. Copy .env.example as .env file and set the Database credentials
  3. Set approprite APP_URL. In case using with Vue Lumen Starter, set it to the Vue App URL.
  4. Install Dependencies: composer install
  5. Run migration: php artisan migrate
  6. Run Seeder: php artisan db:seed

Done!

REST API

Authentication

View contents Send Authorization bearer token to send authenticated request
Authorization: bearer <API_TOKEN>

Register an User

View contents

[POST /register]

Params:

 - `first_name` (string) - Users first name
 - `last_name` (string) - The last name
 - `email` (string) - The user email
 - `password` (string) - The password
 - `password_confirmation` (string) - The confirmation password

Response Code:

  • ✅ 201: On registration success
  • ❌ 422: On validation failure

Login

View contents

[POST /login]

Params:

 - `email` (string) - The user email
 - `password` (string) - The password

Response Code:

  • ✅ 200: On login success
  • ❌ 401: On failure

Fetch current user profile

View contents

[GET /me]

Response Code:

  • ✅ 200: On success
  • ❌ 401: On failure

Update the current user profile

View contents

[POST /me]

Params:

 - `first_name` (string) - Users first name
 - `last_name` (string) - The last name

Response Code:

  • ✅ 200: On login success
  • ❌ 422: On validation failure

Change the password

View contents

[POST /me/password]

Params:

 - `current` (string) - The current password
 - `password` (string) - New password
 - `password_confirmation` (string) - The new confirmation password

Response Code:

  • ✅ 200: On success
  • ❌ 422: On validation failure

Request Password Reset

View contents

[POST /password/request]

Params:

 - `email` (string) - The email

Response Code:

  • ✅ 200: On success
  • ❌ 422: On validation failure

Reset Password

View contents

[POST /password/reset]

Params:

 - `email` (string) - The email
 - `token` (string) - The forgot password token
 - `password` (string) - New password
 - `password_confirmation` (string) - The new confirmation password

Response Code:

  • ✅ 200: On success
  • ❌ 422: On validation failure

Credits

Tareq Hasan

Releases

No releases published

Packages

 
 
 

Languages