@@ -11,14 +11,14 @@ |
||
11 | 11 | |
12 | 12 | class ShopController extends Controller |
13 | 13 | { |
14 | - public function page($category_id=null){ |
|
14 | + public function page($category_id = null) { |
|
15 | 15 | $products = Template::getProducts($category_id); |
16 | 16 | $category = Category::find($category_id); |
17 | 17 | $category_name = ''; |
18 | 18 | $category_description = ''; |
19 | - if($category){ |
|
19 | + if ($category) { |
|
20 | 20 | $category_name = $category->name; |
21 | 21 | }; |
22 | - return view('mongicommerce.pages.shop',compact('products','category_name','category_description')); |
|
22 | + return view('mongicommerce.pages.shop', compact('products', 'category_name', 'category_description')); |
|
23 | 23 | } |
24 | 24 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | class AdminUpdatePackageController extends Controller |
11 | 11 | { |
12 | - public function update(){ |
|
12 | + public function update() { |
|
13 | 13 | #$dd = shell_exec('cd .. && composer update mongi/mongicommerce'); |
14 | 14 | $dd = shell_exec('cd .. && php artisan mongicommerce:update'); |
15 | 15 | echo '<pre>'; |
@@ -11,18 +11,18 @@ |
||
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 | |
24 | - public function details(){ |
|
25 | - return $this->hasManyThrough(ProductItemDetail::class,ProductItem::class); |
|
24 | + public function details() { |
|
25 | + return $this->hasManyThrough(ProductItemDetail::class, ProductItem::class); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 |