square1ltd / laravel-connect
Connect to a laravel backend from anywhere
Installs: 113
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 6
Forks: 1
Open Issues: 0
Type:package
Requires
- php: >=5.6.4
- laravel/framework: ^5.4
- laravel/passport: ^3.0
This package is not auto-updated.
Last update: 2025-01-25 15:12:39 UTC
README
Access data of a laravel app via a REST API.
Installation
$ composer require square1ltd/laravel-connect
Setup
Register the service in the app config
Square1\Laravel\Connect\ConnectServiceProvider::class
Update the Schema Facade in the app config
Replace
'Schema' => Illuminate\Support\Facades\Schema::class
with
'Schema' => Square1\Laravel\Connect\Model\ConnectSchema::class
Double check that the migration files are using the Schema facade
Add authorization guards
'guards' => [
'connect' => [
'driver' => 'passport',
'provider' => 'users',
],
],
Config
$ php artisan connect:init
ENV
CONNECT_API_KEY: api key CONNECT_API_AUTH_CLIENT_ID laravel passport client id CONNECT_API_AUTH_GRANT_TYPE laravel passport grant type ( default is password) CONNECT_API_AUTH_CLIENT_SECRET laravel passport secret