https://github.com/tareq1988/lumen-starter
Lumen framework starter app
https://github.com/tareq1988/lumen-starter
authentication laravel lumen-framework
Last synced: about 1 year ago
JSON representation
Lumen framework starter app
- Host: GitHub
- URL: https://github.com/tareq1988/lumen-starter
- Owner: tareq1988
- Created: 2018-06-15T17:03:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T08:17:11.000Z (almost 8 years ago)
- Last Synced: 2025-03-23T10:51:08.186Z (about 1 year ago)
- Topics: authentication, laravel, lumen-framework
- Language: PHP
- Homepage:
- Size: 74.2 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Lumen Starter
A starter package to use it with [Vue Lumen Starter](https://github.com/tareq1988/vue-lumen-starter).
## Packages Added
* [laravel-cors](https://github.com/barryvdh/laravel-cors)
* [spatie/laravel-fractal](https://github.com/spatie/laravel-fractal)
## Installation
1. Clone the repository: `git clone https://github.com/tareq1988/lumen-starter.git`
1. Copy `.env.example` as `.env` file and set the Database credentials
1. Set approprite `APP_URL`. In case using with [Vue Lumen Starter](https://github.com/tareq1988/vue-lumen-starter), set it to the Vue App URL.
1. Install Dependencies: `composer install`
1. Run migration: `php artisan migrate`
1. Run Seeder: `php artisan db:seed`
Done!
## REST API
### Authentication
View contents
Send Authorization bearer token to send authenticated request
```http
Authorization: bearer
```
### 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](https://tareq.co)