Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit 49d9444

Browse files
committed
setup a new Shopper version
2 parents 55134ce + 857dc4c commit 49d9444

19 files changed

+32
-29
lines changed

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to `Shopper` will be documented in this file.
44

5+
## Version 1.1.2
6+
### Changed
7+
- Return index Lists of Model by last created
8+
9+
### Removed
10+
- Category name unique validation
11+
512
## Version 1.1.1
613
### Added
714
- Sizes slides management

public/css/login.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/login.css.map

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"/js/login.js": "/js/login.js?id=4582565fbd468d95e68e",
3-
"/css/login.css": "/css/login.css?id=dc4d35a3ba39730c7879",
3+
"/css/login.css": "/css/login.css?id=d5210ae8b9e982a48aa2",
44
"/css/shopper.css": "/css/shopper.css?id=09fa142477d7a67721b5",
55
"/js/shopper.js": "/js/shopper.js?id=63751ae37466661da603"
66
}

src/Plugins/Catalogue/Http/Requests/CategoryRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function wantsJson()
2020
* @var array
2121
*/
2222
public $storeRules = [
23-
'name' => 'required|max:255|unique:shopper_catalogue_categories',
23+
'name' => 'required|max:255',
2424
'slug' => 'max:255|unique:shopper_catalogue_categories',
2525
];
2626

@@ -32,7 +32,7 @@ public function wantsJson()
3232
public function getUpdateRules()
3333
{
3434
return [
35-
'name' => 'sometimes|required|max:255|unique:shopper_catalogue_categories,id,' . $this->get('id'),
35+
'name' => 'sometimes|required|max:255',
3636
'slug' => 'sometimes|max:255|unique:shopper_catalogue_categories,id,' . $this->get('id'),
3737
];
3838
}

src/Plugins/Catalogue/Repositories/BannerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ public function find($id, array $relations = [])
106106
*/
107107
public function paginateList(int $count = 10)
108108
{
109-
return $this->model->paginate($count);
109+
return $this->model->orderByDesc('created_at')->paginate($count);
110110
}
111111
}

src/Plugins/Catalogue/Repositories/BrandRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function find($id, array $relations = [])
116116
*/
117117
public function paginateList(int $count = 10)
118118
{
119-
return $this->model->paginate($count);
119+
return $this->model->orderByDesc('created_at')->paginate($count);
120120
}
121121

122122
/**

src/Plugins/Catalogue/Repositories/CategoryRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function find($id, array $relations = [])
118118
*/
119119
public function paginateList(int $count = 10)
120120
{
121-
return $this->model->with('parent')->paginate($count);
121+
return $this->model->with('parent')->orderByDesc('created_at')->paginate($count);
122122
}
123123

124124
/**
@@ -128,6 +128,6 @@ public function paginateList(int $count = 10)
128128
*/
129129
public function active()
130130
{
131-
return $this->model->where('active', 1);
131+
return $this->model->where('active', 1)->orderByDesc('created_at');
132132
}
133133
}

src/Plugins/Catalogue/Repositories/OfferRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function all(int $id)
107107
*/
108108
public function paginateList(int $count = 10)
109109
{
110-
return $this->model->paginate($count);
110+
return $this->model->orderByDesc('created_at')->paginate($count);
111111
}
112112

113113
/**

src/Plugins/Catalogue/Repositories/ProductRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function find($id, array $relations = [])
102102
*/
103103
public function paginateList(int $count = 10)
104104
{
105-
return $this->model->with(['brand', 'category'])->paginate($count);
105+
return $this->model->with(['brand', 'category'])->orderByDesc('created_at')->paginate($count);
106106
}
107107

108108
/**
@@ -126,7 +126,7 @@ public function lastestProducts(array $relations = [], int $results = 4)
126126
{
127127
return $this->model
128128
->with($relations)
129-
->orderBy('created_at', 'desc')
129+
->latest()
130130
->limit($results)
131131
->get();
132132
}

0 commit comments

Comments
 (0)