@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('user_password_holders', function (Blueprint $table) { |
|
| 16 | + Schema::create('user_password_holders', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->foreignId('user_id'); |
| 19 | 19 | $table->string('password')->nullable(); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::table('users', function (Blueprint $table) { |
|
| 16 | + Schema::table('users', function(Blueprint $table) { |
|
| 17 | 17 | $table->string('password')->nullable()->change(); |
| 18 | 18 | $table->tinyInteger('socialite_signup')->default(false); |
| 19 | 19 | $table->tinyInteger('form_signup')->default(false); |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function down() |
| 29 | 29 | { |
| 30 | - Schema::table('users', function (Blueprint $table) { |
|
| 30 | + Schema::table('users', function(Blueprint $table) { |
|
| 31 | 31 | $table->string('password')->change(); |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | 34 | if (Schema::hasColumn('users', 'socialite_signup')) |
| 35 | 35 | { |
| 36 | - Schema::table('users', function (Blueprint $table) |
|
| 36 | + Schema::table('users', function(Blueprint $table) |
|
| 37 | 37 | { |
| 38 | 38 | $table->dropColumn('socialite_signup'); |
| 39 | 39 | }); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | if (Schema::hasColumn('users', 'form_signup')) |
| 43 | 43 | { |
| 44 | - Schema::table('users', function (Blueprint $table) |
|
| 44 | + Schema::table('users', function(Blueprint $table) |
|
| 45 | 45 | { |
| 46 | 46 | $table->dropColumn('form_signup'); |
| 47 | 47 | }); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('old_passwords', function (Blueprint $table) { |
|
| 16 | + Schema::create('old_passwords', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->foreignId('user_id')->constrained('users'); |
| 19 | 19 | $table->string('password'); |
@@ -19,65 +19,65 @@ |
||
| 19 | 19 | protected function defineDatabaseMigrations() |
| 20 | 20 | { |
| 21 | 21 | $this->loadLaravelMigrations(); |
| 22 | - $this->loadMigrationsFrom(__DIR__.'/../src/migrations'); |
|
| 22 | + $this->loadMigrationsFrom(__DIR__ . '/../src/migrations'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | protected function defineRoutes($router) |
| 26 | 26 | { |
| 27 | - $router->post('api/auth/register', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\RegisterController::class, |
|
| 28 | - 'register'])->name('register'); |
|
| 27 | + $router->post('api/auth/register', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\RegisterController::class, |
|
| 28 | + 'register' ])->name('register'); |
|
| 29 | 29 | |
| 30 | - $router->post('api/auth/login', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LoginController::class, |
|
| 31 | - 'login'])->name('login'); |
|
| 30 | + $router->post('api/auth/login', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LoginController::class, |
|
| 31 | + 'login' ])->name('login'); |
|
| 32 | 32 | |
| 33 | - $router->post('api/auth/logout', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LogoutController::class, |
|
| 34 | - 'logout'])->name('logout'); |
|
| 33 | + $router->post('api/auth/logout', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LogoutController::class, |
|
| 34 | + 'logout' ])->name('logout'); |
|
| 35 | 35 | |
| 36 | - $router->post('api/auth/logout-from-all-sessions', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LogoutController::class, |
|
| 37 | - 'logoutFromAllSessions'])->name('logoutFromAllSessions'); |
|
| 36 | + $router->post('api/auth/logout-from-all-sessions', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\LogoutController::class, |
|
| 37 | + 'logoutFromAllSessions' ])->name('logoutFromAllSessions'); |
|
| 38 | 38 | |
| 39 | - $router->get('auth/verify/email/{id}', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\VerificationController::class, |
|
| 40 | - 'verifyUserEmail'])->name('verification.verify'); |
|
| 39 | + $router->get('auth/verify/email/{id}', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\VerificationController::class, |
|
| 40 | + 'verifyUserEmail' ])->name('verification.verify'); |
|
| 41 | 41 | |
| 42 | - $router->post('api/auth/resend/verify/email', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\VerificationController::class, |
|
| 43 | - 'resendUserEmailVerification'])->name('verification.resend'); |
|
| 42 | + $router->post('api/auth/resend/verify/email', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\VerificationController::class, |
|
| 43 | + 'resendUserEmailVerification' ])->name('verification.resend'); |
|
| 44 | 44 | |
| 45 | - $router->post('api/auth/forgot/password', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ForgotPasswordController::class, |
|
| 46 | - 'forgotPassword'])->name('forgotPassword'); |
|
| 45 | + $router->post('api/auth/forgot/password', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ForgotPasswordController::class, |
|
| 46 | + 'forgotPassword' ])->name('forgotPassword'); |
|
| 47 | 47 | |
| 48 | - $router->post('api/auth/reset/password', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ResetPasswordController::class, |
|
| 49 | - 'resetPassword'])->name('resetPassword'); |
|
| 48 | + $router->post('api/auth/reset/password', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ResetPasswordController::class, |
|
| 49 | + 'resetPassword' ])->name('resetPassword'); |
|
| 50 | 50 | |
| 51 | - $router->post('api/change/password', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ChangePasswordController::class, |
|
| 52 | - 'changePassword'])->name('changePassword'); |
|
| 51 | + $router->post('api/change/password', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ChangePasswordController::class, |
|
| 52 | + 'changePassword' ])->name('changePassword'); |
|
| 53 | 53 | |
| 54 | - $router->post('api/edit/profile', [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ProfileController::class, |
|
| 55 | - 'editProfile'])->name('editProfile'); |
|
| 54 | + $router->post('api/edit/profile', [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\ProfileController::class, |
|
| 55 | + 'editProfile' ])->name('editProfile'); |
|
| 56 | 56 | |
| 57 | 57 | $router->post('api/create-two-factor', |
| 58 | - [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'createTwoFactor'])->name('createTwoFactor'); |
|
| 58 | + [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'createTwoFactor' ])->name('createTwoFactor'); |
|
| 59 | 59 | |
| 60 | 60 | $router->post('api/confirm-two-factor', |
| 61 | - [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'confirmTwoFactor'])->name('confirmTwoFactor'); |
|
| 61 | + [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'confirmTwoFactor' ])->name('confirmTwoFactor'); |
|
| 62 | 62 | |
| 63 | 63 | $router->post('api/disable-two-factor', |
| 64 | - [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'disableTwoFactor'])->name('disableTwoFactor'); |
|
| 64 | + [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'disableTwoFactor' ])->name('disableTwoFactor'); |
|
| 65 | 65 | |
| 66 | 66 | $router->post('api/current-recovery-codes', |
| 67 | - [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'currentRecoveryCodes'])->name('currentRecoveryCodes'); |
|
| 67 | + [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'currentRecoveryCodes' ])->name('currentRecoveryCodes'); |
|
| 68 | 68 | |
| 69 | 69 | $router->post('api/new-recovery-codes', |
| 70 | - [\Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'newRecoveryCodes'])->name('newRecoveryCodes'); |
|
| 70 | + [ \Ikechukwukalu\Sanctumauthstarter\Tests\Controllers\TwoFactorController::class, 'newRecoveryCodes' ])->name('newRecoveryCodes'); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | protected function getPackageProviders($app): array |
| 74 | 74 | { |
| 75 | - return [SanctumauthstarterServiceProvider::class, |
|
| 76 | - LocationServiceProvider::class]; |
|
| 75 | + return [ SanctumauthstarterServiceProvider::class, |
|
| 76 | + LocationServiceProvider::class ]; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | protected function getEnvironmentSetUp($app) { |
| 80 | - $app['config']->set('auth.guards.sanctum', [ |
|
| 80 | + $app[ 'config' ]->set('auth.guards.sanctum', [ |
|
| 81 | 81 | 'driver' => 'session', |
| 82 | 82 | 'provider' => 'users', |
| 83 | 83 | ]); |
@@ -33,18 +33,18 @@ |
||
| 33 | 33 | $user->notify(new WelcomeUser($user)); |
| 34 | 34 | |
| 35 | 35 | $time = Carbon::now()->isoFormat('Do of MMMM YYYY, h:mm:ssa'); |
| 36 | - $user->notify(new UserLogin($time, [])); |
|
| 36 | + $user->notify(new UserLogin($time, [ ])); |
|
| 37 | 37 | |
| 38 | 38 | Notification::assertSentTo( |
| 39 | - [$user], PasswordChange::class |
|
| 39 | + [ $user ], PasswordChange::class |
|
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | Notification::assertSentTo( |
| 43 | - [$user], WelcomeUser::class |
|
| 43 | + [ $user ], WelcomeUser::class |
|
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | 46 | Notification::assertSentTo( |
| 47 | - [$user], UserLogin::class |
|
| 47 | + [ $user ], UserLogin::class |
|
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | 50 | Notification::assertCount(3); |
@@ -23,5 +23,5 @@ |
||
| 23 | 23 | 'type', |
| 24 | 24 | ]; |
| 25 | 25 | |
| 26 | - protected $hidden = []; |
|
| 26 | + protected $hidden = [ ]; |
|
| 27 | 27 | } |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | public function toMail($notifiable) |
| 19 | 19 | { |
| 20 | 20 | return (new MailMessage) |
| 21 | - ->subject(trans('sanctumauthstarter::notify.welcome.subject', ['name' => $this->user->name])) |
|
| 22 | - ->line(trans('sanctumauthstarter::notify.welcome.introduction', ['name' => $this->user->name])) |
|
| 21 | + ->subject(trans('sanctumauthstarter::notify.welcome.subject', [ 'name' => $this->user->name ])) |
|
| 22 | + ->line(trans('sanctumauthstarter::notify.welcome.introduction', [ 'name' => $this->user->name ])) |
|
| 23 | 23 | ->line(trans('sanctumauthstarter::notify.welcome.message')) |
| 24 | 24 | ->action(trans('sanctumauthstarter::notify.welcome.action'), url('/')) |
| 25 | 25 | ->line(trans('sanctumauthstarter::notify.welcome.complimentary_close')); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function via($notifiable) |
| 15 | 15 | { |
| 16 | - return ['mail']; |
|
| 16 | + return [ 'mail' ]; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | public function toMail($notifiable) |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return (new MailMessage) |
| 21 | 21 | ->subject(trans('sanctumauthstarter::notify.login.subject')) |
| 22 | - ->line(trans('sanctumauthstarter::notify.login.introduction', ['time' => $this->time, 'deviceAndLocation' => $this->deviceAndLocation])) |
|
| 22 | + ->line(trans('sanctumauthstarter::notify.login.introduction', [ 'time' => $this->time, 'deviceAndLocation' => $this->deviceAndLocation ])) |
|
| 23 | 23 | ->line(trans('sanctumauthstarter::notify.login.message')) |
| 24 | 24 | ->action(trans('sanctumauthstarter::notify.login.action'), route('password.reset')) |
| 25 | 25 | ->line(trans('sanctumauthstarter::notify.login.complimentary_close')); |