Download the PHP package khsing/laravel-restapi without Composer
On this page you can find all versions of the php package khsing/laravel-restapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khsing/laravel-restapi
More information about khsing/laravel-restapi
Files in khsing/laravel-restapi
Package laravel-restapi
Short Description Quick but dirty setup a RESTful API project with Laravel, be evil! ;-)
License MIT
Informations about the package laravel-restapi
laravel-restapi
Intro
This package make OAuth2.0 client credentials able to assign User.
Feature
- client ID support Hashids to encrypt real ID.
Installation
-
Require this package
-
modify
config/app.php
, add itproviders
with following lines - execute
php artisan migrate
-
execute
php artisan vendor:publish
- Need follow laravel/passport setup
Since Laravel 5.5 LTS, passport would specific route register, can custom in app/Providers/AuthServiceProvider.php
Configuare
Support following configure options.
enable_hashids
, boolean, true/falsehashids_salt
, salt of hashids, NEED REPLACE WITH YOURS.hashids_length
, length of hashidshashids_alphabet
, alphabet of hashids
Usage
- create a client app id and secret.
fill user id, client name and get client secret.
- Modify
routes/api.php
Now, access /api/user
will get user's infomation.
btw. Postman is great tools. And the most great part is it's free.
Intergrate with Dingo/api
- install dingo/api,
composer require dingo/api:2.0.0-alpha1
- add dingo to
providers
,Dingo\Api\Provider\LaravelServiceProvider::class,
php artisan vendor:publish
-
modify
app/Http/Kernel.php
with following lines -
modify
config/api.php
auth part - example of dingo/api, in
routes/api.php
same function
License
This library following MIT License, please keep License file.
Contact
Guixing:
- Twitter: https://twitter.com/khsing
- Email: khsing.cnAT.gmail.com
All versions of laravel-restapi with dependencies
laravel/passport Version ^3.0
hashids/hashids Version ^2.0