mainstreamct / syncad-connector-laravel
Connector package for MainstreamCT's Syncad application platform
Requires
- barryvdh/laravel-cors: ^0.11.3
This package is auto-updated.
Last update: 2024-02-27 05:37:09 UTC
README
Recommended tools to complete this integration:
☕🎶💻⏰
This package allows to easily connect any Laravel application to an instance of the syncad application management platform.
Table of contents
Installation
Using Composer
First of all, install the package. Y'all know the drill, but as a reminder:
composer require mainstreamct/syncad-connector-laravel
Then publish the configuration files using:
php artisan vendor:publish
Laravel 5.5 and below
For Laravel 5.5 and below, add this to your config/app.php
:
// Providers array: mainstreamct\SyncadConnectorLaravel\SyncadConnectorServiceProvider::class, // Aliases array: 'Syncad' => mainstreamct\SyncadConnectorLaravel\Syncad::class,
Laravel 5.6 and up
You're all ready to rock! Thanks to package discovery, you don't need to manually add the service provider to your config/app.php
.
Configuration
Connecting things up
- Log in to your Syncad installation and go to Admin > Apps
- Click '+' (Add existing application)
- Fill out your app's details (location, application key)
- Connect!
Configuration options
In config/syncad.php
, you'll find the following options:
key
contains your application key, this should be set in your.env
file.color
specifies a unique app color used in your Syncad dashboard to distinguish your application.login_redirect
specifies the URL a user is redirected to upon login. This defaults to/admin
.name
is the application name that is stored on your Syncad instance upon connecting. It defaults to your.env
'sAPP_NAME
key.
Usage
This package exposes the following endpoints that are used by Syncad.
[POST] connection/test
Params: key
This endpoint tests the connection using the provided key
. It returns an array of environment data used by Syncad to personalize your application.
[POST] login/init
Params: email, token, key
This endpoint returns a login token for a given user using their email
and the stored syncad_token
.
[GET] ext/auth
Params: key
This endpoint logs the user in by the provided Syncad token syncad_token
. This login token is destroyed upon login. The user is then redirected to the login_redirect
URL specified in config/syncad.php
.
Bugs
Found a bug? Message us at support@mainstreamct.com or contact us via the Support environment in your Mainstream Web Portal (MainstreamCT customers only).
Copyright © 2019 MainstreamCT