@@ -5,24 +5,24 @@ |
||
5 | 5 | |
6 | 6 | class Notify extends AbstractPipe { |
7 | 7 | |
8 | - /** |
|
9 | - * Run after the handled job. |
|
10 | - * |
|
11 | - * @param Illuminate\Contracts\Mail\Mailer $mailer |
|
12 | - * @param mixed $handled |
|
13 | - * @param Cerbero\Auth\Jobs\RecoverJob $job |
|
14 | - * @return mixed |
|
15 | - */ |
|
16 | - public function after(Mailer $mailer, $handled, $job) |
|
17 | - { |
|
18 | - $email = $job->email; |
|
8 | + /** |
|
9 | + * Run after the handled job. |
|
10 | + * |
|
11 | + * @param Illuminate\Contracts\Mail\Mailer $mailer |
|
12 | + * @param mixed $handled |
|
13 | + * @param Cerbero\Auth\Jobs\RecoverJob $job |
|
14 | + * @return mixed |
|
15 | + */ |
|
16 | + public function after(Mailer $mailer, $handled, $job) |
|
17 | + { |
|
18 | + $email = $job->email; |
|
19 | 19 | |
20 | - $method = config('_auth.recover.email.queue') ? 'queue' : 'send'; |
|
20 | + $method = config('_auth.recover.email.queue') ? 'queue' : 'send'; |
|
21 | 21 | |
22 | - $mailer->$method(config('_auth.recover.email.view'), ['token' => $handled], function($message) use($email) |
|
23 | - { |
|
24 | - $message->to($email)->subject(trans('auth::recover.email_subject')); |
|
25 | - }); |
|
26 | - } |
|
22 | + $mailer->$method(config('_auth.recover.email.view'), ['token' => $handled], function($message) use($email) |
|
23 | + { |
|
24 | + $message->to($email)->subject(trans('auth::recover.email_subject')); |
|
25 | + }); |
|
26 | + } |
|
27 | 27 | |
28 | 28 | } |
@@ -5,19 +5,19 @@ |
||
5 | 5 | |
6 | 6 | class Hash extends AbstractPipe { |
7 | 7 | |
8 | - /** |
|
9 | - * Run before the job is handled. |
|
10 | - * |
|
11 | - * @param Illuminate\Contracts\Hashing\Hasher |
|
12 | - * @param Cerbero\Auth\Jobs\RegisterJob $job |
|
13 | - * @return mixed |
|
14 | - */ |
|
15 | - public function before(Hasher $hasher, $job) |
|
16 | - { |
|
17 | - if($hasher->needsRehash($password = $job->attributes['password'])) |
|
18 | - { |
|
19 | - $job->attributes['password'] = $hasher->make($password); |
|
20 | - } |
|
21 | - } |
|
8 | + /** |
|
9 | + * Run before the job is handled. |
|
10 | + * |
|
11 | + * @param Illuminate\Contracts\Hashing\Hasher |
|
12 | + * @param Cerbero\Auth\Jobs\RegisterJob $job |
|
13 | + * @return mixed |
|
14 | + */ |
|
15 | + public function before(Hasher $hasher, $job) |
|
16 | + { |
|
17 | + if($hasher->needsRehash($password = $job->attributes['password'])) |
|
18 | + { |
|
19 | + $job->attributes['password'] = $hasher->make($password); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | |
23 | 23 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function before(Hasher $hasher, $job) |
16 | 16 | { |
17 | - if($hasher->needsRehash($password = $job->attributes['password'])) |
|
17 | + if ($hasher->needsRehash($password = $job->attributes['password'])) |
|
18 | 18 | { |
19 | 19 | $job->attributes['password'] = $hasher->make($password); |
20 | 20 | } |
@@ -5,32 +5,32 @@ |
||
5 | 5 | |
6 | 6 | class RegisterJob implements SelfHandling { |
7 | 7 | |
8 | - /** |
|
9 | - * @author Andrea Marco Sartori |
|
10 | - * @var array $attributes User attributes. |
|
11 | - */ |
|
12 | - public $attributes; |
|
8 | + /** |
|
9 | + * @author Andrea Marco Sartori |
|
10 | + * @var array $attributes User attributes. |
|
11 | + */ |
|
12 | + public $attributes; |
|
13 | 13 | |
14 | - /** |
|
15 | - * Create a new job instance. |
|
16 | - * |
|
17 | - * @return void |
|
18 | - */ |
|
19 | - public function __construct() |
|
20 | - { |
|
21 | - $fields = config('_auth.register.fields'); |
|
14 | + /** |
|
15 | + * Create a new job instance. |
|
16 | + * |
|
17 | + * @return void |
|
18 | + */ |
|
19 | + public function __construct() |
|
20 | + { |
|
21 | + $fields = config('_auth.register.fields'); |
|
22 | 22 | |
23 | - $this->attributes = app('request')->only($fields); |
|
24 | - } |
|
23 | + $this->attributes = app('request')->only($fields); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * Execute the job. |
|
28 | - * |
|
29 | - * @return void |
|
30 | - */ |
|
31 | - public function handle(UserRepositoryInterface $user) |
|
32 | - { |
|
33 | - return $user->register($this->attributes); |
|
34 | - } |
|
26 | + /** |
|
27 | + * Execute the job. |
|
28 | + * |
|
29 | + * @return void |
|
30 | + */ |
|
31 | + public function handle(UserRepositoryInterface $user) |
|
32 | + { |
|
33 | + return $user->register($this->attributes); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | } |
@@ -5,14 +5,14 @@ |
||
5 | 5 | |
6 | 6 | class LogoutJob implements SelfHandling { |
7 | 7 | |
8 | - /** |
|
9 | - * Execute the job. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function handle(Guard $auth) |
|
14 | - { |
|
15 | - $auth->logout(); |
|
16 | - } |
|
8 | + /** |
|
9 | + * Execute the job. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function handle(Guard $auth) |
|
14 | + { |
|
15 | + $auth->logout(); |
|
16 | + } |
|
17 | 17 | |
18 | 18 | } |
@@ -6,41 +6,41 @@ |
||
6 | 6 | |
7 | 7 | class LoginJob implements SelfHandling { |
8 | 8 | |
9 | - /** |
|
10 | - * @author Andrea Marco Sartori |
|
11 | - * @var array $credentials Credentials. |
|
12 | - */ |
|
13 | - public $credentials; |
|
14 | - |
|
15 | - /** |
|
16 | - * @author Andrea Marco Sartori |
|
17 | - * @var boolean $remember Whether to remember the session. |
|
18 | - */ |
|
19 | - public $remember; |
|
20 | - |
|
21 | - /** |
|
22 | - * Create a new job instance. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function __construct() |
|
27 | - { |
|
28 | - $this->credentials = app('request')->only(config('_auth.login.fields')); |
|
29 | - |
|
30 | - $this->remember = app('request')->get(config('_auth.login.remember_me'), false); |
|
31 | - } |
|
32 | - |
|
33 | - /** |
|
34 | - * Execute the job. |
|
35 | - * |
|
36 | - * @return void |
|
37 | - */ |
|
38 | - public function handle(Guard $auth) |
|
39 | - { |
|
40 | - if( ! $auth->attempt($this->credentials, $this->remember)) |
|
41 | - { |
|
42 | - throw new DisplayException('auth::login.error'); |
|
43 | - } |
|
44 | - } |
|
9 | + /** |
|
10 | + * @author Andrea Marco Sartori |
|
11 | + * @var array $credentials Credentials. |
|
12 | + */ |
|
13 | + public $credentials; |
|
14 | + |
|
15 | + /** |
|
16 | + * @author Andrea Marco Sartori |
|
17 | + * @var boolean $remember Whether to remember the session. |
|
18 | + */ |
|
19 | + public $remember; |
|
20 | + |
|
21 | + /** |
|
22 | + * Create a new job instance. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function __construct() |
|
27 | + { |
|
28 | + $this->credentials = app('request')->only(config('_auth.login.fields')); |
|
29 | + |
|
30 | + $this->remember = app('request')->get(config('_auth.login.remember_me'), false); |
|
31 | + } |
|
32 | + |
|
33 | + /** |
|
34 | + * Execute the job. |
|
35 | + * |
|
36 | + * @return void |
|
37 | + */ |
|
38 | + public function handle(Guard $auth) |
|
39 | + { |
|
40 | + if( ! $auth->attempt($this->credentials, $this->remember)) |
|
41 | + { |
|
42 | + throw new DisplayException('auth::login.error'); |
|
43 | + } |
|
44 | + } |
|
45 | 45 | |
46 | 46 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | public function handle(Guard $auth) |
39 | 39 | { |
40 | - if( ! $auth->attempt($this->credentials, $this->remember)) |
|
40 | + if (!$auth->attempt($this->credentials, $this->remember)) |
|
41 | 41 | { |
42 | 42 | throw new DisplayException('auth::login.error'); |
43 | 43 | } |
@@ -7,43 +7,43 @@ |
||
7 | 7 | |
8 | 8 | class ResetJob implements SelfHandling { |
9 | 9 | |
10 | - /** |
|
11 | - * @author Andrea Marco Sartori |
|
12 | - * @var string $password Password input. |
|
13 | - */ |
|
14 | - public $password; |
|
15 | - |
|
16 | - /** |
|
17 | - * @author Andrea Marco Sartori |
|
18 | - * @var string $token Reset token. |
|
19 | - */ |
|
20 | - public $token; |
|
21 | - |
|
22 | - /** |
|
23 | - * Create a new job instance. |
|
24 | - * |
|
25 | - * @return void |
|
26 | - */ |
|
27 | - public function __construct($password, $token) |
|
28 | - { |
|
29 | - $this->password = $password; |
|
30 | - |
|
31 | - $this->token = $token; |
|
32 | - } |
|
33 | - |
|
34 | - /** |
|
35 | - * Execute the job. |
|
36 | - * |
|
37 | - * @return void |
|
38 | - */ |
|
39 | - public function handle(UserRepositoryInterface $users, Hasher $hasher) |
|
40 | - { |
|
41 | - if( ! $user = $users->findByResetToken($this->token)) |
|
42 | - { |
|
43 | - throw new DisplayException('auth::reset.error'); |
|
44 | - } |
|
45 | - |
|
46 | - $users->resetPassword($user, $hasher->make($this->password)); |
|
47 | - } |
|
10 | + /** |
|
11 | + * @author Andrea Marco Sartori |
|
12 | + * @var string $password Password input. |
|
13 | + */ |
|
14 | + public $password; |
|
15 | + |
|
16 | + /** |
|
17 | + * @author Andrea Marco Sartori |
|
18 | + * @var string $token Reset token. |
|
19 | + */ |
|
20 | + public $token; |
|
21 | + |
|
22 | + /** |
|
23 | + * Create a new job instance. |
|
24 | + * |
|
25 | + * @return void |
|
26 | + */ |
|
27 | + public function __construct($password, $token) |
|
28 | + { |
|
29 | + $this->password = $password; |
|
30 | + |
|
31 | + $this->token = $token; |
|
32 | + } |
|
33 | + |
|
34 | + /** |
|
35 | + * Execute the job. |
|
36 | + * |
|
37 | + * @return void |
|
38 | + */ |
|
39 | + public function handle(UserRepositoryInterface $users, Hasher $hasher) |
|
40 | + { |
|
41 | + if( ! $user = $users->findByResetToken($this->token)) |
|
42 | + { |
|
43 | + throw new DisplayException('auth::reset.error'); |
|
44 | + } |
|
45 | + |
|
46 | + $users->resetPassword($user, $hasher->make($this->password)); |
|
47 | + } |
|
48 | 48 | |
49 | 49 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function handle(UserRepositoryInterface $users, Hasher $hasher) |
40 | 40 | { |
41 | - if( ! $user = $users->findByResetToken($this->token)) |
|
41 | + if (!$user = $users->findByResetToken($this->token)) |
|
42 | 42 | { |
43 | 43 | throw new DisplayException('auth::reset.error'); |
44 | 44 | } |
@@ -16,15 +16,15 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function boot() |
18 | 18 | { |
19 | - $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'auth'); |
|
19 | + $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'auth'); |
|
20 | 20 | |
21 | - $this->publishes([__DIR__.'/../config/_auth.php' => config_path('_auth.php')], 'config'); |
|
21 | + $this->publishes([__DIR__ . '/../config/_auth.php' => config_path('_auth.php')], 'config'); |
|
22 | 22 | |
23 | - $this->publishes([__DIR__.'/../database/migrations/' => database_path('migrations')], 'migration'); |
|
23 | + $this->publishes([__DIR__ . '/../database/migrations/' => database_path('migrations')], 'migration'); |
|
24 | 24 | |
25 | - $this->publishes([__DIR__.'/../resources/lang/' => base_path('resources/lang/vendor/auth')], 'lang'); |
|
25 | + $this->publishes([__DIR__ . '/../resources/lang/' => base_path('resources/lang/vendor/auth')], 'lang'); |
|
26 | 26 | |
27 | - include __DIR__.'/Http/routes.php'; |
|
27 | + include __DIR__ . '/Http/routes.php'; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function register() |
36 | 36 | { |
37 | - $this->mergeConfigFrom(__DIR__.'/../config/_auth.php', 'auth'); |
|
37 | + $this->mergeConfigFrom(__DIR__ . '/../config/_auth.php', 'auth'); |
|
38 | 38 | |
39 | 39 | $this->registerUserRepository(); |
40 | 40 |
@@ -9,77 +9,77 @@ |
||
9 | 9 | */ |
10 | 10 | class AuthServiceProvider extends ServiceProvider { |
11 | 11 | |
12 | - /** |
|
13 | - * Boot up the package. |
|
14 | - * |
|
15 | - * @return void |
|
16 | - */ |
|
17 | - public function boot() |
|
18 | - { |
|
19 | - $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'auth'); |
|
20 | - |
|
21 | - $this->publishes([__DIR__.'/../config/_auth.php' => config_path('_auth.php')], 'config'); |
|
22 | - |
|
23 | - $this->publishes([__DIR__.'/../database/migrations/' => database_path('migrations')], 'migration'); |
|
24 | - |
|
25 | - $this->publishes([__DIR__.'/../resources/lang/' => base_path('resources/lang/vendor/auth')], 'lang'); |
|
26 | - |
|
27 | - include __DIR__.'/Http/routes.php'; |
|
28 | - } |
|
29 | - |
|
30 | - /** |
|
31 | - * Register the service provider. |
|
32 | - * |
|
33 | - * @return void |
|
34 | - */ |
|
35 | - public function register() |
|
36 | - { |
|
37 | - $this->mergeConfigFrom(__DIR__.'/../config/_auth.php', 'auth'); |
|
38 | - |
|
39 | - $this->registerUserRepository(); |
|
40 | - |
|
41 | - $this->registerThrottler(); |
|
42 | - |
|
43 | - $this->registerDispatcher(); |
|
44 | - } |
|
45 | - |
|
46 | - /** |
|
47 | - * Register the user repository. |
|
48 | - * |
|
49 | - * @author Andrea Marco Sartori |
|
50 | - * @return void |
|
51 | - */ |
|
52 | - private function registerUserRepository() |
|
53 | - { |
|
54 | - $userRepo = 'Cerbero\Auth\Repositories\EloquentUserRepository'; |
|
55 | - |
|
56 | - $this->app->bind('Cerbero\Auth\Repositories\UserRepositoryInterface', $userRepo); |
|
57 | - } |
|
58 | - |
|
59 | - /** |
|
60 | - * Register the login throttling service. |
|
61 | - * |
|
62 | - * @author Andrea Marco Sartori |
|
63 | - * @return void |
|
64 | - */ |
|
65 | - private function registerThrottler() |
|
66 | - { |
|
67 | - $throttler = 'Cerbero\Auth\Services\Throttling\CachingThrottler'; |
|
68 | - |
|
69 | - $this->app->bind('Cerbero\Auth\Services\Throttling\ThrottlerInterface', $throttler); |
|
70 | - } |
|
71 | - |
|
72 | - /** |
|
73 | - * Register the dispatcher service. |
|
74 | - * |
|
75 | - * @author Andrea Marco Sartori |
|
76 | - * @return void |
|
77 | - */ |
|
78 | - private function registerDispatcher() |
|
79 | - { |
|
80 | - $dispatcher = 'Cerbero\Auth\Services\Dispatcher\MarshalDispatcher'; |
|
81 | - |
|
82 | - $this->app->bind('Cerbero\Auth\Services\Dispatcher\DispatcherInterface', $dispatcher); |
|
83 | - } |
|
12 | + /** |
|
13 | + * Boot up the package. |
|
14 | + * |
|
15 | + * @return void |
|
16 | + */ |
|
17 | + public function boot() |
|
18 | + { |
|
19 | + $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'auth'); |
|
20 | + |
|
21 | + $this->publishes([__DIR__.'/../config/_auth.php' => config_path('_auth.php')], 'config'); |
|
22 | + |
|
23 | + $this->publishes([__DIR__.'/../database/migrations/' => database_path('migrations')], 'migration'); |
|
24 | + |
|
25 | + $this->publishes([__DIR__.'/../resources/lang/' => base_path('resources/lang/vendor/auth')], 'lang'); |
|
26 | + |
|
27 | + include __DIR__.'/Http/routes.php'; |
|
28 | + } |
|
29 | + |
|
30 | + /** |
|
31 | + * Register the service provider. |
|
32 | + * |
|
33 | + * @return void |
|
34 | + */ |
|
35 | + public function register() |
|
36 | + { |
|
37 | + $this->mergeConfigFrom(__DIR__.'/../config/_auth.php', 'auth'); |
|
38 | + |
|
39 | + $this->registerUserRepository(); |
|
40 | + |
|
41 | + $this->registerThrottler(); |
|
42 | + |
|
43 | + $this->registerDispatcher(); |
|
44 | + } |
|
45 | + |
|
46 | + /** |
|
47 | + * Register the user repository. |
|
48 | + * |
|
49 | + * @author Andrea Marco Sartori |
|
50 | + * @return void |
|
51 | + */ |
|
52 | + private function registerUserRepository() |
|
53 | + { |
|
54 | + $userRepo = 'Cerbero\Auth\Repositories\EloquentUserRepository'; |
|
55 | + |
|
56 | + $this->app->bind('Cerbero\Auth\Repositories\UserRepositoryInterface', $userRepo); |
|
57 | + } |
|
58 | + |
|
59 | + /** |
|
60 | + * Register the login throttling service. |
|
61 | + * |
|
62 | + * @author Andrea Marco Sartori |
|
63 | + * @return void |
|
64 | + */ |
|
65 | + private function registerThrottler() |
|
66 | + { |
|
67 | + $throttler = 'Cerbero\Auth\Services\Throttling\CachingThrottler'; |
|
68 | + |
|
69 | + $this->app->bind('Cerbero\Auth\Services\Throttling\ThrottlerInterface', $throttler); |
|
70 | + } |
|
71 | + |
|
72 | + /** |
|
73 | + * Register the dispatcher service. |
|
74 | + * |
|
75 | + * @author Andrea Marco Sartori |
|
76 | + * @return void |
|
77 | + */ |
|
78 | + private function registerDispatcher() |
|
79 | + { |
|
80 | + $dispatcher = 'Cerbero\Auth\Services\Dispatcher\MarshalDispatcher'; |
|
81 | + |
|
82 | + $this->app->bind('Cerbero\Auth\Services\Dispatcher\DispatcherInterface', $dispatcher); |
|
83 | + } |
|
84 | 84 | |
85 | 85 | } |
@@ -2,144 +2,144 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - # prefix for your authentication routes e.g. auth/login |
|
6 | - 'routes_prefix' => 'auth', |
|
5 | + # prefix for your authentication routes e.g. auth/login |
|
6 | + 'routes_prefix' => 'auth', |
|
7 | 7 | |
8 | - # the auth controller, you may use your own by extending the default one |
|
9 | - 'controller' => 'Cerbero\Auth\Http\Controllers\AuthController', |
|
8 | + # the auth controller, you may use your own by extending the default one |
|
9 | + 'controller' => 'Cerbero\Auth\Http\Controllers\AuthController', |
|
10 | 10 | |
11 | - # prevent spam and forms being submitted by bots |
|
12 | - 'honeypot' => [ |
|
11 | + # prevent spam and forms being submitted by bots |
|
12 | + 'honeypot' => [ |
|
13 | 13 | |
14 | - # do you want to turn honeypot on? |
|
15 | - 'enabled' => true, |
|
14 | + # do you want to turn honeypot on? |
|
15 | + 'enabled' => true, |
|
16 | 16 | |
17 | - # the name of the fake field to put in your views |
|
18 | - # remember to hide this field with CSS |
|
19 | - 'field' => 'mobile', |
|
20 | - ], |
|
17 | + # the name of the fake field to put in your views |
|
18 | + # remember to hide this field with CSS |
|
19 | + 'field' => 'mobile', |
|
20 | + ], |
|
21 | 21 | |
22 | - 'login' => [ |
|
22 | + 'login' => [ |
|
23 | 23 | |
24 | - # route where the user logs in |
|
25 | - 'route' => 'login', |
|
24 | + # route where the user logs in |
|
25 | + 'route' => 'login', |
|
26 | 26 | |
27 | - # the name of the route where the user is redirected after logging in |
|
28 | - 'redirect' => 'dashboard', |
|
27 | + # the name of the route where the user is redirected after logging in |
|
28 | + 'redirect' => 'dashboard', |
|
29 | 29 | |
30 | - # the view used to display the login page |
|
31 | - 'view' => 'auth.login', |
|
30 | + # the view used to display the login page |
|
31 | + 'view' => 'auth.login', |
|
32 | 32 | |
33 | - # the rules to validate the login fields |
|
34 | - 'rules' => [ |
|
35 | - 'email' => 'required|email', |
|
36 | - 'password' => 'required', |
|
37 | - ], |
|
33 | + # the rules to validate the login fields |
|
34 | + 'rules' => [ |
|
35 | + 'email' => 'required|email', |
|
36 | + 'password' => 'required', |
|
37 | + ], |
|
38 | 38 | |
39 | - # the fields of the login form |
|
40 | - 'fields' => ['email', 'password'], |
|
39 | + # the fields of the login form |
|
40 | + 'fields' => ['email', 'password'], |
|
41 | 41 | |
42 | - # the name of the "Remember me" checkbox, set null if not present |
|
43 | - 'remember_me' => 'remember', |
|
42 | + # the name of the "Remember me" checkbox, set null if not present |
|
43 | + 'remember_me' => 'remember', |
|
44 | 44 | |
45 | - # prevent too many wrong login attempts |
|
46 | - 'throttling' => [ |
|
45 | + # prevent too many wrong login attempts |
|
46 | + 'throttling' => [ |
|
47 | 47 | |
48 | - # do you want to turn throttling on? |
|
49 | - 'enabled' => true, |
|
48 | + # do you want to turn throttling on? |
|
49 | + 'enabled' => true, |
|
50 | 50 | |
51 | - # the number of allowed login attempts |
|
52 | - 'max_attempts' => 5, |
|
51 | + # the number of allowed login attempts |
|
52 | + 'max_attempts' => 5, |
|
53 | 53 | |
54 | - # the number of seconds to wait before the next attempt |
|
55 | - 'delay' => 60, |
|
56 | - ], |
|
57 | - ], |
|
54 | + # the number of seconds to wait before the next attempt |
|
55 | + 'delay' => 60, |
|
56 | + ], |
|
57 | + ], |
|
58 | 58 | |
59 | - 'register' => [ |
|
59 | + 'register' => [ |
|
60 | 60 | |
61 | - # route where the user registers his account |
|
62 | - 'route' => 'register', |
|
61 | + # route where the user registers his account |
|
62 | + 'route' => 'register', |
|
63 | 63 | |
64 | - # the name of the route where the user is redirected after logging in |
|
65 | - 'redirect' => 'login.index', |
|
64 | + # the name of the route where the user is redirected after logging in |
|
65 | + 'redirect' => 'login.index', |
|
66 | 66 | |
67 | - # the view used to display the registration page |
|
68 | - 'view' => 'auth.register', |
|
67 | + # the view used to display the registration page |
|
68 | + 'view' => 'auth.register', |
|
69 | 69 | |
70 | - # the rules to validate the registration fields |
|
71 | - 'rules' => [ |
|
72 | - 'email' => 'required|email|unique:users', |
|
73 | - 'password' => 'required|min:6|confirmed', |
|
74 | - ], |
|
70 | + # the rules to validate the registration fields |
|
71 | + 'rules' => [ |
|
72 | + 'email' => 'required|email|unique:users', |
|
73 | + 'password' => 'required|min:6|confirmed', |
|
74 | + ], |
|
75 | 75 | |
76 | - # the fields of the registration form |
|
77 | - 'fields' => ['email', 'password'], |
|
76 | + # the fields of the registration form |
|
77 | + 'fields' => ['email', 'password'], |
|
78 | 78 | |
79 | - # do you want to log in the user after his registration? |
|
80 | - 'login_after_registering' => false, |
|
79 | + # do you want to log in the user after his registration? |
|
80 | + 'login_after_registering' => false, |
|
81 | 81 | |
82 | - 'email' => [ |
|
82 | + 'email' => [ |
|
83 | 83 | |
84 | - # do you want to send a welcome email? |
|
85 | - 'send' => true, |
|
84 | + # do you want to send a welcome email? |
|
85 | + 'send' => true, |
|
86 | 86 | |
87 | - # do you want to enqueue email sending? |
|
88 | - 'queue' => false, |
|
87 | + # do you want to enqueue email sending? |
|
88 | + 'queue' => false, |
|
89 | 89 | |
90 | - # the view used to display the welcome email |
|
91 | - 'view' => 'emails.register', |
|
90 | + # the view used to display the welcome email |
|
91 | + 'view' => 'emails.register', |
|
92 | 92 | |
93 | - # do you want to generate a password for the user? |
|
94 | - # you can show it in the welcome email by using {{ $password }} |
|
95 | - 'generate_password_for_user' => false, |
|
96 | - ], |
|
97 | - ], |
|
93 | + # do you want to generate a password for the user? |
|
94 | + # you can show it in the welcome email by using {{ $password }} |
|
95 | + 'generate_password_for_user' => false, |
|
96 | + ], |
|
97 | + ], |
|
98 | 98 | |
99 | - 'recover' => [ |
|
99 | + 'recover' => [ |
|
100 | 100 | |
101 | - # route where the user recovers his password |
|
102 | - 'route' => 'recover', |
|
101 | + # route where the user recovers his password |
|
102 | + 'route' => 'recover', |
|
103 | 103 | |
104 | - # the view used to display the password recovery page |
|
105 | - 'view' => 'auth.recover', |
|
104 | + # the view used to display the password recovery page |
|
105 | + 'view' => 'auth.recover', |
|
106 | 106 | |
107 | - # the rules to validate the recovery fields |
|
108 | - 'rules' => [ |
|
109 | - 'email' => 'required|email|exists:users,email' |
|
110 | - ], |
|
107 | + # the rules to validate the recovery fields |
|
108 | + 'rules' => [ |
|
109 | + 'email' => 'required|email|exists:users,email' |
|
110 | + ], |
|
111 | 111 | |
112 | - 'email' => [ |
|
112 | + 'email' => [ |
|
113 | 113 | |
114 | - # the view used to display the recovery email |
|
115 | - 'view' => 'emails.recover', |
|
114 | + # the view used to display the recovery email |
|
115 | + 'view' => 'emails.recover', |
|
116 | 116 | |
117 | - # do you want to enqueue email sending? |
|
118 | - 'queue' => false, |
|
119 | - ], |
|
120 | - ], |
|
117 | + # do you want to enqueue email sending? |
|
118 | + 'queue' => false, |
|
119 | + ], |
|
120 | + ], |
|
121 | 121 | |
122 | - 'reset' => [ |
|
122 | + 'reset' => [ |
|
123 | 123 | |
124 | - # route where the user resets his password |
|
125 | - 'route' => 'reset', |
|
124 | + # route where the user resets his password |
|
125 | + 'route' => 'reset', |
|
126 | 126 | |
127 | - # the view used to display the password reset page |
|
128 | - 'view' => 'auth.reset', |
|
127 | + # the view used to display the password reset page |
|
128 | + 'view' => 'auth.reset', |
|
129 | 129 | |
130 | - # the rules to validate the reset fields |
|
131 | - 'rules' => [ |
|
132 | - 'password' => 'required|min:6|confirmed' |
|
133 | - ], |
|
134 | - ], |
|
130 | + # the rules to validate the reset fields |
|
131 | + 'rules' => [ |
|
132 | + 'password' => 'required|min:6|confirmed' |
|
133 | + ], |
|
134 | + ], |
|
135 | 135 | |
136 | - 'logout' => [ |
|
136 | + 'logout' => [ |
|
137 | 137 | |
138 | - # route where the user logs out |
|
139 | - 'route' => 'logout', |
|
138 | + # route where the user logs out |
|
139 | + 'route' => 'logout', |
|
140 | 140 | |
141 | - # the name of the route where the user is redirected after logging in |
|
142 | - 'redirect' => 'home', |
|
143 | - ], |
|
141 | + # the name of the route where the user is redirected after logging in |
|
142 | + 'redirect' => 'home', |
|
143 | + ], |
|
144 | 144 | |
145 | 145 | ]; |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - 'error' => 'Te veel login pogingen. Probeer het over :seconds seconden opnieuw.', |
|
5 | + 'error' => 'Te veel login pogingen. Probeer het over :seconds seconden opnieuw.', |
|
6 | 6 | |
7 | 7 | ]; |