@@ -8,8 +8,8 @@ |
||
| 8 | 8 | |
| 9 | 9 | class AdminSettingsController |
| 10 | 10 | { |
| 11 | - public function page(){ |
|
| 11 | + public function page() { |
|
| 12 | 12 | $settings = AdminSetting::first(); |
| 13 | - return view('mongicommerce::admin.pages.settings',['settings' => $settings]); |
|
| 13 | + return view('mongicommerce::admin.pages.settings', ['settings' => $settings]); |
|
| 14 | 14 | } |
| 15 | 15 | } |
@@ -11,13 +11,13 @@ |
||
| 11 | 11 | { |
| 12 | 12 | use HasFactory; |
| 13 | 13 | |
| 14 | - protected $dates = ["created_at","updated_at"]; |
|
| 14 | + protected $dates = ["created_at", "updated_at"]; |
|
| 15 | 15 | |
| 16 | - public function items(){ |
|
| 16 | + public function items() { |
|
| 17 | 17 | return $this->hasMany(ProductItem::class); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - public function category(){ |
|
| 20 | + public function category() { |
|
| 21 | 21 | return $this->belongsTo(Category::class); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | return $this->children_rec()->with('children'); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - public function configuration_fields(){ |
|
| 32 | + public function configuration_fields() { |
|
| 33 | 33 | return $this->hasMany(ConfigurationField::class); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('product_configuration_fields', function (Blueprint $table) { |
|
| 16 | + Schema::create('product_configuration_fields', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->unsignedBigInteger('product_item_id'); |
| 19 | 19 | $table->unsignedBigInteger('config_field_id'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('admin_settings', function (Blueprint $table) { |
|
| 16 | + Schema::create('admin_settings', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('shop_name')->default('MongiCommerce'); |
| 19 | 19 | $table->string('iban')->default('DE79100110012626219557'); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
| 25 | 25 | $this->loadRoutesFrom(__DIR__.'/routes.php'); |
| 26 | 26 | |
| 27 | - if(Schema::hasTable('admin_settings')){ |
|
| 27 | + if (Schema::hasTable('admin_settings')) { |
|
| 28 | 28 | //inject global information into views |
| 29 | 29 | View::share('mongicommerce', AdminSetting::first()); |
| 30 | 30 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | if ($this->app->runningInConsole()) { |
| 34 | 34 | |
| 35 | 35 | $config_file = config_path('mongicommerce.php'); |
| 36 | - if(file_exists($config_file)){ |
|
| 36 | + if (file_exists($config_file)) { |
|
| 37 | 37 | File::delete($config_file); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'mongicommerce'); |
| 77 | 77 | |
| 78 | 78 | // Register the main class to use with the facade |
| 79 | - $this->app->singleton('mongicommerce', function () { |
|
| 79 | + $this->app->singleton('mongicommerce', function() { |
|
| 80 | 80 | return new Mongicommerce; |
| 81 | 81 | }); |
| 82 | 82 | } |