@@ -18,21 +18,21 @@ |
||
18 | 18 | ], 'variables-config'); |
19 | 19 | |
20 | 20 | if (! class_exists('CreateVariablesTable')) { |
21 | - $timestamp = date('Y_m_d_His', time()); |
|
21 | + $timestamp = date('Y_m_d_His', time()); |
|
22 | 22 | |
23 | - $this->publishes([ |
|
24 | - __DIR__.'/../database/migrations/create_variables_table.php.stub' => $this->app->databasePath()."/migrations/{$timestamp}_create_variables_table.php", |
|
25 | - ], 'variables-migrations'); |
|
23 | + $this->publishes([ |
|
24 | + __DIR__.'/../database/migrations/create_variables_table.php.stub' => $this->app->databasePath()."/migrations/{$timestamp}_create_variables_table.php", |
|
25 | + ], 'variables-migrations'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | 29 | if ($this->app->runningInConsole()) { |
30 | - $this->commands([ |
|
31 | - Commands\SetVariable::class, |
|
32 | - Commands\AllVariable::class, |
|
33 | - Commands\GetVariable::class, |
|
34 | - Commands\DeleteVariable::class, |
|
35 | - ]); |
|
30 | + $this->commands([ |
|
31 | + Commands\SetVariable::class, |
|
32 | + Commands\AllVariable::class, |
|
33 | + Commands\GetVariable::class, |
|
34 | + Commands\DeleteVariable::class, |
|
35 | + ]); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | __DIR__.'/../config/variables.php' => config_path('variables.php'), |
18 | 18 | ], 'variables-config'); |
19 | 19 | |
20 | - if (! class_exists('CreateVariablesTable')) { |
|
20 | + if (!class_exists('CreateVariablesTable')) { |
|
21 | 21 | $timestamp = date('Y_m_d_His', time()); |
22 | 22 | |
23 | 23 | $this->publishes([ |
@@ -121,7 +121,7 @@ |
||
121 | 121 | */ |
122 | 122 | protected function getAll() |
123 | 123 | { |
124 | - $settings = $this->cacheRepo->remember($this->cacheName, $this->cacheTime, function () { |
|
124 | + $settings = $this->cacheRepo->remember($this->cacheName, $this->cacheTime, function() { |
|
125 | 125 | return $this->variableModel->all(); |
126 | 126 | }); |
127 | 127 |
@@ -1,20 +1,20 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('var_all')) { |
|
3 | +if (!function_exists('var_all')) { |
|
4 | 4 | function var_all($locale = null) |
5 | 5 | { |
6 | 6 | return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->all(); |
7 | 7 | } |
8 | 8 | } |
9 | 9 | |
10 | -if (! function_exists('var_get')) { |
|
10 | +if (!function_exists('var_get')) { |
|
11 | 11 | function var_get($name, $default = null, $locale = null) |
12 | 12 | { |
13 | 13 | return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->get($name, $default); |
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | -if (! function_exists('var_set')) { |
|
17 | +if (!function_exists('var_set')) { |
|
18 | 18 | function var_set($name, $value = null, $locale = null) |
19 | 19 | { |
20 | 20 | return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->set($name, $value, $locale); |
@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | |
25 | -if (! function_exists('var_delete')) { |
|
25 | +if (!function_exists('var_delete')) { |
|
26 | 26 | function var_delete($name, $locale = null) |
27 | 27 | { |
28 | 28 | return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->delete($name, $locale); |
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | -if (! function_exists('var_set_array')) { |
|
32 | +if (!function_exists('var_set_array')) { |
|
33 | 33 | function var_set_array(array $attributes, $locale = null) |
34 | 34 | { |
35 | 35 | return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->setArray($attributes); |
@@ -22,6 +22,6 @@ |
||
22 | 22 | $variableMng = app(\Fomvasss\Variable\VariableManagerContract::class); |
23 | 23 | |
24 | 24 | $variable = $variableMng->locale($this->argument('locale'))->get($this->argument('name'), ''); |
25 | - print_r($variable . "\n"); |
|
25 | + print_r($variable."\n"); |
|
26 | 26 | } |
27 | 27 | } |