Answer the question
In order to leave comments, you need to log in
How to connect Sentinel in Laravel 5.2?
How to write gradle that will enable Sentinel authorization and authentication by default?
Answer the question
In order to leave comments, you need to log in
First you need to create a service provider that override Auth for example app/Providers/AdminServiceProvider.php
And there we connect the Sentinel class
namespace App\Providers;
use Auth;
use Cartalyst\Sentinel\Sentinel;
use Illuminate\Support\ServiceProvider;
class AdminServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public
function boot()
{
Auth::provider('our_provider', function($app, array $config) {
return new Sentinel();
});
}
/**
* Register the application services.
*
* @return void
*/
public
function register()
{
//
}
}
app/config/auth.php
'providers' => [
'users' => [
'driver' => 'our_provider',
],
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question