@@ -8,65 +8,65 @@ |
||
8 | 8 | |
9 | 9 | class ProductSku extends Model |
10 | 10 | { |
11 | - /** |
|
12 | - * Table name of the model |
|
13 | - * |
|
14 | - * @var string |
|
15 | - */ |
|
16 | - protected $table = 'product_skus'; |
|
11 | + /** |
|
12 | + * Table name of the model |
|
13 | + * |
|
14 | + * @var string |
|
15 | + */ |
|
16 | + protected $table = 'product_skus'; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Disable the timestamp on model creation |
|
20 | - * |
|
21 | - * @var bool |
|
22 | - */ |
|
23 | - public $timestamps = false; |
|
18 | + /** |
|
19 | + * Disable the timestamp on model creation |
|
20 | + * |
|
21 | + * @var bool |
|
22 | + */ |
|
23 | + public $timestamps = false; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Fields that can be mass assigned |
|
27 | - * |
|
28 | - * @var array |
|
29 | - */ |
|
30 | - protected $fillable = [ |
|
31 | - 'product_id', 'code', 'price', 'cost' |
|
32 | - ]; |
|
25 | + /** |
|
26 | + * Fields that can be mass assigned |
|
27 | + * |
|
28 | + * @var array |
|
29 | + */ |
|
30 | + protected $fillable = [ |
|
31 | + 'product_id', 'code', 'price', 'cost' |
|
32 | + ]; |
|
33 | 33 | |
34 | - /** |
|
35 | - * Fields that are guarded during mass assign |
|
36 | - * |
|
37 | - * @var array |
|
38 | - */ |
|
39 | - protected $guarded = [ |
|
40 | - 'id' |
|
41 | - ]; |
|
34 | + /** |
|
35 | + * Fields that are guarded during mass assign |
|
36 | + * |
|
37 | + * @var array |
|
38 | + */ |
|
39 | + protected $guarded = [ |
|
40 | + 'id' |
|
41 | + ]; |
|
42 | 42 | |
43 | - /** |
|
44 | - * Relation to the product |
|
45 | - * |
|
46 | - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
47 | - */ |
|
48 | - public function product(): BelongsTo |
|
49 | - { |
|
50 | - return $this->belongsTo(config('laravel-inventory.product')); |
|
51 | - } |
|
43 | + /** |
|
44 | + * Relation to the product |
|
45 | + * |
|
46 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
47 | + */ |
|
48 | + public function product(): BelongsTo |
|
49 | + { |
|
50 | + return $this->belongsTo(config('laravel-inventory.product')); |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * Product Variant |
|
55 | - * |
|
56 | - * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
57 | - */ |
|
58 | - public function variant(): HasMany |
|
59 | - { |
|
60 | - return $this->hasMany('Ronmrcdo\Inventory\Models\ProductVariant', 'product_sku_id'); |
|
61 | - } |
|
53 | + /** |
|
54 | + * Product Variant |
|
55 | + * |
|
56 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
57 | + */ |
|
58 | + public function variant(): HasMany |
|
59 | + { |
|
60 | + return $this->hasMany('Ronmrcdo\Inventory\Models\ProductVariant', 'product_sku_id'); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * Product sku has many stocks |
|
65 | - * |
|
66 | - * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
67 | - */ |
|
68 | - public function stocks(): HasMany |
|
69 | - { |
|
70 | - return $this->hasMany('Ronmrcdo\Inventory\Models\InventoryStock'); |
|
71 | - } |
|
63 | + /** |
|
64 | + * Product sku has many stocks |
|
65 | + * |
|
66 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
67 | + */ |
|
68 | + public function stocks(): HasMany |
|
69 | + { |
|
70 | + return $this->hasMany('Ronmrcdo\Inventory\Models\InventoryStock'); |
|
71 | + } |
|
72 | 72 | } |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | public function boot(): void |
15 | 15 | { |
16 | 16 | // Publishing is only necessary when using the CLI. |
17 | - if ($this->app->runningInConsole()) { |
|
18 | - $this->bootForConsole(); |
|
19 | - } |
|
17 | + if ($this->app->runningInConsole()) { |
|
18 | + $this->bootForConsole(); |
|
19 | + } |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
33 | - * Get the services provided by the provider. |
|
34 | - * |
|
35 | - * @return array |
|
36 | - */ |
|
37 | - public function provides() |
|
38 | - { |
|
39 | - return ['inventory']; |
|
40 | - } |
|
33 | + * Get the services provided by the provider. |
|
34 | + * |
|
35 | + * @return array |
|
36 | + */ |
|
37 | + public function provides() |
|
38 | + { |
|
39 | + return ['inventory']; |
|
40 | + } |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Register the bootable configurations |
@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | protected function bootForConsole(): void |
48 | 48 | { |
49 | 49 | $this->publishes([ |
50 | - __DIR__.'/../config/laravel-inventory.php' => base_path('config/laravel-inventory.php'), |
|
50 | + __DIR__.'/../config/laravel-inventory.php' => base_path('config/laravel-inventory.php'), |
|
51 | 51 | ], 'config'); |
52 | 52 | |
53 | 53 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
54 | 54 | |
55 | 55 | $this->publishes([ |
56 | - __DIR__.'/../database/migrations' => database_path('migrations') |
|
57 | - ], 'migrations'); |
|
56 | + __DIR__.'/../database/migrations' => database_path('migrations') |
|
57 | + ], 'migrations'); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | \ No newline at end of file |