@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function up(): void |
41 | 41 | { |
42 | - Schema::create($this->tokenTable, static function (Blueprint $table) { |
|
42 | + Schema::create($this->tokenTable, static function(Blueprint $table) { |
|
43 | 43 | $table->increments('id'); |
44 | 44 | $table->string('mobile')->index(); |
45 | 45 | $table->string('token', 10)->index(); |
@@ -48,14 +48,14 @@ discard block |
||
48 | 48 | $table->index(['mobile', 'token']); |
49 | 49 | }); |
50 | 50 | |
51 | - if (! Schema::hasColumn($this->userTable, $this->mobileColumn)) { |
|
52 | - Schema::table($this->userTable, function (Blueprint $table) { |
|
51 | + if (!Schema::hasColumn($this->userTable, $this->mobileColumn)) { |
|
52 | + Schema::table($this->userTable, function(Blueprint $table) { |
|
53 | 53 | $table->string($this->mobileColumn); |
54 | 54 | }); |
55 | 55 | } |
56 | 56 | |
57 | - if (! Schema::hasColumn($this->userTable, 'mobile_verified_at')) { |
|
58 | - Schema::table($this->userTable, function (Blueprint $table) { |
|
57 | + if (!Schema::hasColumn($this->userTable, 'mobile_verified_at')) { |
|
58 | + Schema::table($this->userTable, function(Blueprint $table) { |
|
59 | 59 | $table->timestamp('mobile_verified_at')->nullable()->after($this->mobileColumn); |
60 | 60 | }); |
61 | 61 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | Schema::drop($this->tokenTable); |
72 | 72 | |
73 | - Schema::table($this->userTable, static function (Blueprint $table) { |
|
73 | + Schema::table($this->userTable, static function(Blueprint $table) { |
|
74 | 74 | $table->dropColumn('mobile_verified_at'); |
75 | 75 | }); |
76 | 76 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function send($notifiable, Notification $notification) |
37 | 37 | { |
38 | - if (! $to = $notifiable->routeNotificationFor('verification_mobile', $notification)) { |
|
38 | + if (!$to = $notifiable->routeNotificationFor('verification_mobile', $notification)) { |
|
39 | 39 | return; |
40 | 40 | } |
41 | 41 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $user = $event->user; |
39 | 39 | |
40 | - if ($user instanceof MustVerifyMobile && ! $user->hasVerifiedMobile()) { |
|
40 | + if ($user instanceof MustVerifyMobile && !$user->hasVerifiedMobile()) { |
|
41 | 41 | $this->tokenBroker->sendToken($user); |
42 | 42 | } |
43 | 43 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | ->where('token', $token) |
102 | 102 | ->first(); |
103 | 103 | |
104 | - return $record && ! $this->tokenExpired($record['expires_at']); |
|
104 | + return $record && !$this->tokenExpired($record['expires_at']); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -20,7 +20,7 @@ |
||
20 | 20 | { |
21 | 21 | $user = auth()->user(); |
22 | 22 | |
23 | - if (! $user || ($user instanceof MustVerifyMobile && ! $user->hasVerifiedMobile())) { |
|
23 | + if (!$user || ($user instanceof MustVerifyMobile && !$user->hasVerifiedMobile())) { |
|
24 | 24 | return $request->expectsJson() |
25 | 25 | ? abort(403, 'Your mobile number is not verified.') |
26 | 26 | : redirect('/')->withErrors(['mobile' => 'Your mobile number is not verified.']); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function registerRoutes(): void |
56 | 56 | { |
57 | - Route::group($this->routeConfiguration(), function () { |
|
57 | + Route::group($this->routeConfiguration(), function() { |
|
58 | 58 | $this->loadRoutesFrom(__DIR__.'/Http/routes.php'); |
59 | 59 | }); |
60 | 60 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | protected function registerBindings(): void |
94 | 94 | { |
95 | - $this->app->singleton(SMSClient::class, static function ($app) { |
|
95 | + $this->app->singleton(SMSClient::class, static function($app) { |
|
96 | 96 | try { |
97 | 97 | return $app->make(config('mobile_verifier.sms_client')); |
98 | 98 | } catch (Throwable $e) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | }); |
102 | 102 | |
103 | - $this->app->bind(TokenRepositoryInterface::class, static function ($app) { |
|
103 | + $this->app->bind(TokenRepositoryInterface::class, static function($app) { |
|
104 | 104 | return new DatabaseTokenRepository( |
105 | 105 | $app->make(ConnectionInterface::class), |
106 | 106 | config('mobile_verifier.token_table', 'mobile_verification_tokens'), |