@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function boot() |
| 22 | 22 | { |
| 23 | 23 | |
| 24 | - Blade::directive('money', function ($amount){ |
|
| 24 | + Blade::directive('money', function($amount) { |
|
| 25 | 25 | #return $fmt->formatCurrency($amount,"EUR"); |
| 26 | 26 | /*return "<?= $fmt->formatCurrency($amount,'EUR'); ?>";*/ |
| 27 | 27 | return "<?= abs($amount) > 1000 ? '€ ' .number_format($amount, 0, ',', '.') : '€ ' . number_format($amount, 2, ',', '.') ?>"; |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
| 36 | 36 | $this->loadRoutesFrom(__DIR__.'/routes.php'); |
| 37 | 37 | |
| 38 | - if(Schema::hasTable('admin_settings')){ |
|
| 38 | + if (Schema::hasTable('admin_settings')) { |
|
| 39 | 39 | //inject global information into views |
| 40 | 40 | View::share('mongicommerce', AdminSetting::first()); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if(Schema::hasTable('categories')){ |
|
| 43 | + if (Schema::hasTable('categories')) { |
|
| 44 | 44 | //inject global information into views |
| 45 | 45 | View::share('categories', Template::getCategoryTree()); |
| 46 | 46 | } |
@@ -51,17 +51,17 @@ discard block |
||
| 51 | 51 | $config_file = config_path('mongicommerce.php'); |
| 52 | 52 | |
| 53 | 53 | |
| 54 | - if(file_exists($config_file)){ |
|
| 54 | + if (file_exists($config_file)) { |
|
| 55 | 55 | File::delete($config_file); |
| 56 | 56 | error_log('Cancello il file di configurazione'); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
| 60 | - if(file_exists(resource_path('/views/mongicommerce'))){ |
|
| 60 | + if (file_exists(resource_path('/views/mongicommerce'))) { |
|
| 61 | 61 | File::deleteDirectory(resource_path('/views/mongicommerce')); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if(file_exists(public_path('/mongicommerce/template'))){ |
|
| 64 | + if (file_exists(public_path('/mongicommerce/template'))) { |
|
| 65 | 65 | File::deleteDirectory(public_path('/mongicommerce/template')); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'mongicommerce'); |
| 107 | 107 | |
| 108 | 108 | // Register the main class to use with the facade |
| 109 | - $this->app->singleton('mongicommerce', function () { |
|
| 109 | + $this->app->singleton('mongicommerce', function() { |
|
| 110 | 110 | return new Mongicommerce; |
| 111 | 111 | }); |
| 112 | 112 | } |