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

Commit

Permalink
setup a new Shopper version
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Apr 12, 2019
2 parents 55134ce + 857dc4c commit 49d9444
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 29 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

## Version 1.1.2
### Changed
- Return index Lists of Model by last created

### Removed
- Category name unique validation

## Version 1.1.1
### Added
- Sizes slides management
Expand Down
2 changes: 1 addition & 1 deletion public/css/login.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions public/css/login.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/js/login.js": "/js/login.js?id=4582565fbd468d95e68e",
"/css/login.css": "/css/login.css?id=dc4d35a3ba39730c7879",
"/css/login.css": "/css/login.css?id=d5210ae8b9e982a48aa2",
"/css/shopper.css": "/css/shopper.css?id=09fa142477d7a67721b5",
"/js/shopper.js": "/js/shopper.js?id=63751ae37466661da603"
}
4 changes: 2 additions & 2 deletions src/Plugins/Catalogue/Http/Requests/CategoryRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function wantsJson()
* @var array
*/
public $storeRules = [
'name' => 'required|max:255|unique:shopper_catalogue_categories',
'name' => 'required|max:255',
'slug' => 'max:255|unique:shopper_catalogue_categories',
];

Expand All @@ -32,7 +32,7 @@ public function wantsJson()
public function getUpdateRules()
{
return [
'name' => 'sometimes|required|max:255|unique:shopper_catalogue_categories,id,' . $this->get('id'),
'name' => 'sometimes|required|max:255',
'slug' => 'sometimes|max:255|unique:shopper_catalogue_categories,id,' . $this->get('id'),
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Catalogue/Repositories/BannerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}
}
2 changes: 1 addition & 1 deletion src/Plugins/Catalogue/Repositories/BrandRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Plugins/Catalogue/Repositories/CategoryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->with('parent')->paginate($count);
return $this->model->with('parent')->orderByDesc('created_at')->paginate($count);
}

/**
Expand All @@ -128,6 +128,6 @@ public function paginateList(int $count = 10)
*/
public function active()
{
return $this->model->where('active', 1);
return $this->model->where('active', 1)->orderByDesc('created_at');
}
}
2 changes: 1 addition & 1 deletion src/Plugins/Catalogue/Repositories/OfferRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function all(int $id)
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Plugins/Catalogue/Repositories/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->with(['brand', 'category'])->paginate($count);
return $this->model->with(['brand', 'category'])->orderByDesc('created_at')->paginate($count);
}

/**
Expand All @@ -126,7 +126,7 @@ public function lastestProducts(array $relations = [], int $results = 4)
{
return $this->model
->with($relations)
->orderBy('created_at', 'desc')
->latest()
->limit($results)
->get();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Catalogue/Repositories/ReviewRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Catalogue/Repositories/SizeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Plugins/Orders/Repositories/OrderRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function paginateList(int $count = 10)
{
return $this->model
->with(['user', 'status', 'shippingType', 'paymentMethod'])
->orderByDesc('created_at')
->paginate($count);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Orders/Repositories/PaymentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Orders/Repositories/ShippingTypeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function find($id)
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Orders/Repositories/StatusRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function find($id)
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Tags/Repositories/TagRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function find($id, array $relations = [])
*/
public function paginateList(int $count = 10)
{
return $this->model->paginate($count);
return $this->model->orderByDesc('created_at')->paginate($count);
}

/**
Expand Down
13 changes: 2 additions & 11 deletions src/Plugins/Users/Repositories/BalanceRepository.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<?php
/**
* Created by IntelliJ IDEA.
* User: Mac
* Date: 2019-03-27
* Time: 15:12
*/

namespace Mckenziearts\Shopper\Plugins\Users\Repositories;


use Mckenziearts\Shopper\Plugins\Users\Models\Transaction;
use Mckenziearts\Shopper\Plugins\Users\Models\User;
use Mckenziearts\Shopper\Plugins\Users\Models\Wallet;
Expand Down Expand Up @@ -60,7 +53,6 @@ public function save(array $data, int $user_id)
}

return false;

}

/**
Expand All @@ -73,8 +65,8 @@ public function save(array $data, int $user_id)
public function update(array $data, $id)
{
return Transaction::findOrFail($id)->update([
'amount' => $data['amount'],
'meta' => $data['meta'],
'amount' => $data['amount'],
'meta' => $data['meta'],
'accepted' => $data['accepted'],
]);
}
Expand All @@ -89,5 +81,4 @@ public function delete($ids)
{
return Transaction::whereIn('id', explode(',', $ids))->delete();
}

}
2 changes: 1 addition & 1 deletion src/Shopper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Shopper
/**
* Shopper Version.
*/
const VERSION = '1.1.1';
const VERSION = '1.1.2';

/**
* @var
Expand Down

0 comments on commit 49d9444

Please sign in to comment.