Downloads
Stars
Version
This package provides essential functionalities to work with Engine apps on Laravel.
$ composer require betalabs/engine-laravel-helper
$ php artisan vendor:publish --provider="Betalabs\LaravelHelper\LaravelHelperServiceProvider"
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
\Betalabs\LaravelHelper\LaravelHelper::routes();
}
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
\Laravel\Passport\Passport::routes();
}
config/auth.php
configuration file, you should set the driver option of the api authentication guard to passport and the users provider model to our Tenant model.
This will instruct your application to use Passport's TokenGuard when authenticating incoming API requests:'guards' => [
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => \Betalabs\LaravelHelper\Models\Tenant::class,
],
],
$ php artisan app:deploy