Download the PHP package nlocascio/mindbody-laravel-auth without Composer
On this page you can find all versions of the php package nlocascio/mindbody-laravel-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nlocascio/mindbody-laravel-auth
More information about nlocascio/mindbody-laravel-auth
Files in nlocascio/mindbody-laravel-auth
Package mindbody-laravel-auth
Short Description MINDBODY Auth Wrapper for Laravel
License MIT
Informations about the package mindbody-laravel-auth
Laravel MINDBODY Auth
This package is a Laravel User Provider which authenticates user logins through MINDBODY. It exposes two auth drivers: one for authenticating Client credentials, and one for authenticating Staff credentials.
Requirements
This package requires:
- PHP 7.0+
- Laravel 5.1+
- Nlocascio/Mindbody-Laravel 0.2.0+
Installation
Install the package through Composer:
This package requires nlocascio/mindbody-laravel
to communicate with the MINDBODY API. You must configure that package first before proceeding.
Laravel
Register the Service Provider
In config/app.php
, append to the providers
key before App\Providers\AuthServiceProvider::class
is declared:
Configure the User Provider
In your app's config/auth.php
, add the following to the providers
key:
For authenticating Clients with MINDBODY:
For authenticating Staff with MINDBODY:
Note that your model
can point to any Eloquent model which implements Illuminate\Contracts\Auth\Authenticatable
. Depending on the needs of your application, you may prefer to have different models for different types of users; however, using the default App/User.php
will work for many cases.
Configure the Authentication Guards
In your app's config/auth.php
, add the following to the guards
key:
For MINDBODY Client credentials:
or for MINDBODY Staff credentials:
Use the Guards in your Middleware
Now that you've registered and configured the guards, you may use them in your application by using the auth:mindbody_client
or auth:mindbody_staff
middleware.
You can set one of these guards to be the default authentication guard in config/auth.php
under the defaults
key:
All versions of mindbody-laravel-auth with dependencies
illuminate/support Version 5.1.* || 5.2.* || 5.3.* || 5.4.*
nlocascio/mindbody-laravel Version ~0.3.3