@@ -22,8 +22,8 @@ |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | public function store() { |
25 | - if (! auth()->check()) { |
|
26 | - abort (403, 'Only authenticated users can create new posts.'); |
|
25 | + if (!auth()->check()) { |
|
26 | + abort(403, 'Only authenticated users can create new posts.'); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | } |
@@ -50,15 +50,15 @@ |
||
50 | 50 | $this->info('Laravel VTPass Package Installation Complete!'); |
51 | 51 | } |
52 | 52 | |
53 | - private function writeChanges($path, string $key, string $configKey, $value){ |
|
53 | + private function writeChanges($path, string $key, string $configKey, $value) { |
|
54 | 54 | if (Str::contains(file_get_contents($path), "$key") === false) { |
55 | 55 | $this->info("Now writing .env with $key=$value ..."); |
56 | - file_put_contents($path, PHP_EOL."$key=$value".PHP_EOL, FILE_APPEND); |
|
57 | - }else{ |
|
56 | + file_put_contents($path, PHP_EOL . "$key=$value" . PHP_EOL, FILE_APPEND); |
|
57 | + } else { |
|
58 | 58 | $this->info("Now updating $key value in your .env to $value ..."); |
59 | 59 | // update existing entry |
60 | 60 | file_put_contents($path, str_replace( |
61 | - "$key=".$this->laravel['config']["vtpass.$configKey"], |
|
61 | + "$key=" . $this->laravel['config']["vtpass.$configKey"], |
|
62 | 62 | "$key=$value", file_get_contents($path) |
63 | 63 | )); |
64 | 64 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | if (Str::contains(file_get_contents($path), "$key") === false) { |
55 | 55 | $this->info("Now writing .env with $key=$value ..."); |
56 | 56 | file_put_contents($path, PHP_EOL."$key=$value".PHP_EOL, FILE_APPEND); |
57 | - }else{ |
|
57 | + } else{ |
|
58 | 58 | $this->info("Now updating $key value in your .env to $value ..."); |
59 | 59 | // update existing entry |
60 | 60 | file_put_contents($path, str_replace( |
@@ -115,8 +115,9 @@ |
||
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | - if ($this->hasError) |
|
119 | - throw new VTPassErrorException($this->message, "$code"); |
|
118 | + if ($this->hasError) { |
|
119 | + throw new VTPassErrorException($this->message, "$code"); |
|
120 | + } |
|
120 | 121 | |
121 | 122 | } |
122 | 123 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | { |
52 | 52 | $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'vtpass'); |
53 | 53 | |
54 | - $this->app->singleton('vtpass', function ($app) { |
|
54 | + $this->app->singleton('vtpass', function($app) { |
|
55 | 55 | $baseUrl = config('vtpass.base_url'); |
56 | 56 | $instanceName = 'vtpass'; |
57 | 57 |