@@ -31,7 +31,7 @@ |
||
31 | 31 | /** |
32 | 32 | * Get the notification's delivery channels. |
33 | 33 | * |
34 | - * @return array |
|
34 | + * @return string[] |
|
35 | 35 | */ |
36 | 36 | public function via() |
37 | 37 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Bus\Queueable; |
6 | 6 | use Illuminate\Notifications\Notification; |
7 | -use Illuminate\Contracts\Queue\ShouldQueue; |
|
8 | 7 | use Illuminate\Notifications\Messages\MailMessage; |
9 | 8 | |
10 | 9 | class ResetPasswordNotification extends Notification |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php namespace App\Providers; |
2 | 2 | |
3 | 3 | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
4 | -use Illuminate\Http\Request; |
|
5 | 4 | use Illuminate\Routing\Router; |
6 | 5 | |
7 | 6 | class RouteServiceProvider extends ServiceProvider |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'middleware' => 'api', |
51 | 51 | 'namespace' => $this->namespace, |
52 | 52 | 'prefix' => 'api/v1', |
53 | - ], function (Router $router) { |
|
53 | + ], function(Router $router) { |
|
54 | 54 | $router->post('login', 'Auth\LoginController@login'); |
55 | 55 | $router->post('logout', 'Auth\LoginController@logout')->middleware('auth:api'); |
56 | 56 | $router->post('register', 'Auth\RegisterController@register'); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | app('router')->group([ |
76 | 76 | 'middleware' => 'web', |
77 | 77 | 'namespace' => $this->namespace, |
78 | - ], function (Router $router) { |
|
78 | + ], function(Router $router) { |
|
79 | 79 | $defaultLocale = config('app.locale'); |
80 | 80 | |
81 | 81 | //----------------------------------------------------------------------- |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | foreach (config('app.locales') as $prefix => $localeName) { |
93 | 93 | app('translator')->setLocale($prefix); |
94 | 94 | // Localized routes. |
95 | - $router->group(compact('namespace', 'middleware', 'prefix'), function (Router $router) use ($prefix) { |
|
95 | + $router->group(compact('namespace', 'middleware', 'prefix'), function(Router $router) use ($prefix) { |
|
96 | 96 | $this->localizeWebRoutes($router, $prefix); |
97 | 97 | }); |
98 | 98 | } |
@@ -111,23 +111,23 @@ discard block |
||
111 | 111 | */ |
112 | 112 | protected function localizeWebRoutes(Router $router, $prefix = '') |
113 | 113 | { |
114 | - $router->get('login', ['uses' => 'Auth\LoginController@showLoginForm', 'as' => empty($prefix) ?: $prefix . '.login']); |
|
114 | + $router->get('login', ['uses' => 'Auth\LoginController@showLoginForm', 'as' => empty($prefix) ?: $prefix.'.login']); |
|
115 | 115 | $router->post('login', 'Auth\LoginController@loginViaWeb'); |
116 | - $router->get('logout', ['uses' => 'Auth\LoginController@logout', 'as' => empty($prefix) ?: $prefix . '.logout']); |
|
117 | - $router->get('register', ['uses' => 'Auth\RegisterController@showRegistrationForm', 'as' => empty($prefix) ?: $prefix . '.register']); |
|
116 | + $router->get('logout', ['uses' => 'Auth\LoginController@logout', 'as' => empty($prefix) ?: $prefix.'.logout']); |
|
117 | + $router->get('register', ['uses' => 'Auth\RegisterController@showRegistrationForm', 'as' => empty($prefix) ?: $prefix.'.register']); |
|
118 | 118 | $router->post('register', 'Auth\RegisterController@register'); |
119 | 119 | |
120 | - $router->get('password/email', ['uses' => 'Auth\PasswordController@requestPasswordResetLink', 'as' => empty($prefix) ?: $prefix . '.password.email']); |
|
120 | + $router->get('password/email', ['uses' => 'Auth\PasswordController@requestPasswordResetLink', 'as' => empty($prefix) ?: $prefix.'.password.email']); |
|
121 | 121 | $router->post('password/email', 'Auth\PasswordController@sendPasswordResetLink'); |
122 | - $router->get('password/reset/{token}', ['uses' => 'Auth\PasswordController@showPasswordResetForm', 'as' => empty($prefix) ?: $prefix . '.password.reset']); |
|
122 | + $router->get('password/reset/{token}', ['uses' => 'Auth\PasswordController@showPasswordResetForm', 'as' => empty($prefix) ?: $prefix.'.password.reset']); |
|
123 | 123 | $router->post('password/reset', 'Auth\PasswordController@resetPassword'); |
124 | 124 | |
125 | - $router->get('activation', ['uses' => 'Auth\ActivateController@requestActivationCode', 'as' => empty($prefix) ?: $prefix . '.activation.request']); |
|
126 | - $router->get('activation/{token}', ['uses' => 'Auth\ActivateController@activate', 'as' => empty($prefix) ?: $prefix . '.activation.complete']); |
|
125 | + $router->get('activation', ['uses' => 'Auth\ActivateController@requestActivationCode', 'as' => empty($prefix) ?: $prefix.'.activation.request']); |
|
126 | + $router->get('activation/{token}', ['uses' => 'Auth\ActivateController@activate', 'as' => empty($prefix) ?: $prefix.'.activation.complete']); |
|
127 | 127 | $router->post('activation', 'Auth\ActivateController@activate'); |
128 | 128 | |
129 | 129 | $router->resource('files', 'FilesController', ['only' => ['index', 'create', 'store', 'show', 'destroy']]); |
130 | 130 | |
131 | - $router->get('', ['uses' => 'HomeController@index', 'as' => empty($prefix) ?: $prefix . '.home']); |
|
131 | + $router->get('', ['uses' => 'HomeController@index', 'as' => empty($prefix) ?: $prefix.'.home']); |
|
132 | 132 | } |
133 | 133 | } |
@@ -12,6 +12,6 @@ |
||
12 | 12 | | simple approach to interacting with each command's IO methods. |
13 | 13 | | |
14 | 14 | */ |
15 | -app('artisan')->command('inspire', function () { |
|
15 | +app('artisan')->command('inspire', function() { |
|
16 | 16 | $this->comment(Inspiring::quote()); |
17 | 17 | }); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | |
14 | 14 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ |
15 | -$factory->define(App\Models\User::class, function (Faker\Generator $faker) { |
|
15 | +$factory->define(App\Models\User::class, function(Faker\Generator $faker) { |
|
16 | 16 | static $password; |
17 | 17 | |
18 | 18 | return [ |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $validator = app('validator')->make($request->all(), [ |
106 | 106 | 'token' => 'required|string', |
107 | 107 | 'email' => 'required|email|max:255', |
108 | - 'password' => 'required|confirmed|min:' . app('config')->get('auth.passwords.users.min_length') |
|
108 | + 'password' => 'required|confirmed|min:'.app('config')->get('auth.passwords.users.min_length') |
|
109 | 109 | ]); |
110 | 110 | if ($validator->fails()) { |
111 | 111 | throw new ValidationException($validator); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | $passwordBroker = app('auth.password.broker'); |
117 | 117 | $response = $passwordBroker->reset( |
118 | - $credentials, function (User $user, $password) { |
|
118 | + $credentials, function(User $user, $password) { |
|
119 | 119 | $user->password = app('hash')->make($password); |
120 | 120 | $user->save(); |
121 | 121 | app('auth.driver')->login($user); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $validator = app('validator')->make($request->all(), [ |
44 | 44 | 'name' => 'sometimes|required|max:255', |
45 | 45 | 'email' => 'required|email|max:255|unique:users', |
46 | - 'password' => 'required|confirmed|min:' . config('auth.passwords.users.min_length'), |
|
46 | + 'password' => 'required|confirmed|min:'.config('auth.passwords.users.min_length'), |
|
47 | 47 | ]); |
48 | 48 | if ($validator->fails()) { |
49 | 49 | throw new ValidationException($validator); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | if ($request->expectsJson()) { |
38 | 38 | throw new UnauthorizedHttpException('Unauthorized'); |
39 | 39 | } else { |
40 | - return redirect()->guest(route(app('translator')->getLocale() . '.login')); |
|
40 | + return redirect()->guest(route(app('translator')->getLocale().'.login')); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 |
@@ -17,8 +17,8 @@ |
||
17 | 17 | app(BroadcastManager::class)->routes(); |
18 | 18 | |
19 | 19 | // Authenticate the user's personal channel... |
20 | - app(BroadcastManager::class)->channel('App.Models.User.*', function ($user, $userId) { |
|
21 | - return (int)$user->id === (int)$userId; |
|
20 | + app(BroadcastManager::class)->channel('App.Models.User.*', function($user, $userId) { |
|
21 | + return (int) $user->id === (int) $userId; |
|
22 | 22 | }); |
23 | 23 | } |
24 | 24 | } |