Skip to content

Nice and clean concept of the Lumen Framework for REST API application with PASSPORT authentication

Notifications You must be signed in to change notification settings

turkprogrammer/Lumen-REST-API

Repository files navigation

Lumen PHP Framework

Build Status Total Downloads Latest Stable Version License

Lumen REST API with PASSPORT authentication(https://github.com/dusterio/lumen-passport) and Guzzle(https://docs.guzzlephp.org/en/stable/quickstart.html) and Lumen Generator (https://github.com/flipboxstudio/lumen-generator)
project hosted on https://phpsandbox.io/n/4pksg Start
Databes is SQlLite
migrations already exists
run migrations (if forked or locally not in )

How to Use App: CLI commands:

App\Models\Post::factory()->count(15)->create()
App\Models\User::factory()->count(5)->create()

Use for REST Postman:

User login https://4pksg.ciroue.com/api/login
GET/ posts: https://4pksg.ciroue.com/api/posts
PUT/ posts: https://4pksg.ciroue.com/api/posts/10
POST/ Post: https://4pksg.ciroue.com/api/posts
DELETE/ Post: https://4pksg.ciroue.com/api/posts/10
Oauth login: https://4pksg.ciroue.com/v1/oauth/token
Register: https://4pksg.ciroue.com/api/register
Logout: https://4pksg.ciroue.com/api/logout
config/service.php:
return [ 'passport' => [ 'login_endpoint' => env('PASSPORT_LOGIN_ENDPOINT'), 'client_id' => env('PASSPORT_CLIENT_ID'), 'client_secret' => env('PASSPORT_CLIENT_SECRET'), ] ];

The Passport constants are placed in .env

About

Nice and clean concept of the Lumen Framework for REST API application with PASSPORT authentication

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published