authenticate yapılacak config bilgilerini laravel gruplandırıyor.Bunlara da bekçi diyor.
Aslında düz mantıkta authenticate hangi bilgilerle yapılacak bunu kullanıcı değiştirebilirmi? bu sorunun cevabıdır bu.
Ornegin sadece auth::attempt();
yaparsan ;
config.php
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
baktıgında default guard web olarak gelmiş..yani dizideki guards dizisine baktıgında web keyini okuyacak.driveri session provideri users şeklinde bir grupta sen atabilirsin mesela.
sen bunu değiştirebiliyorsun.