upgrade to lavael 6.0

This commit is contained in:
rahul shukla 2019-12-27 13:30:05 +05:30
parent 23a15be1e0
commit 5c0843c470
5 changed files with 30 additions and 20 deletions

View File

@ -18,21 +18,22 @@
"ext-pdo_mysql": "*",
"ext-tokenizer": "*",
"astrotomic/laravel-translatable": "^11.0.0",
"barryvdh/laravel-dompdf": "0.8.4",
"barryvdh/laravel-dompdf": "0.8.5",
"doctrine/dbal": "2.9.2",
"fideloper/proxy": "^4.0",
"flynsarmy/db-blade-compiler": "*",
"guzzlehttp/guzzle": "~6.0",
"intervention/image": "^2.4",
"intervention/imagecache": "^2.3",
"kalnoy/nestedset": "^4.3",
"kalnoy/nestedset": "5.0.0",
"konekt/concord": "^1.2",
"laravel/framework": "5.8.*",
"laravel/framework": "^6.0",
"laravel/helpers": "^1.1",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "3.1.11",
"maatwebsite/excel": "3.1.18",
"nwidart/laravel-modules": "^3.2",
"prettus/l5-repository": "2.6.32",
"tymon/jwt-auth": "1.0.0-rc.4"
"prettus/l5-repository": "^2.6",
"tymon/jwt-auth": "^1.0.0"
},
"require-dev": {
@ -40,7 +41,7 @@
"barryvdh/laravel-debugbar": "^3.1",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"laravel/dusk": "^4.0",
"laravel/dusk": "^5.7.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"

View File

@ -82,18 +82,28 @@ abstract class Repository extends BaseRepository {
return $this->parserResult($model);
}
/**
* @return mixed
/**
* Count results of repository
*
* @param array $where
* @param string $columns
*
* @return int
*/
public function count()
public function count(array $where = [], $columns = '*')
{
$this->applyCriteria();
$this->applyScope();
$total = $this->model->count();
$this->resetModel();
if ($where) {
$this->applyConditions($where);
}
return $total;
$result = $this->model->count($columns);
$this->resetModel();
$this->resetScope();
return $result;
}
/**

View File

@ -170,7 +170,7 @@ class WishlistController extends Controller
} catch (\Exception $e) {
session()->flash('warning', $e->getMessage());
return redirect()->route('shop.productOrCategory.index', ['slug' => $wishlistItem->product->url_key]);
return redirect()->route('shop.productOrCategory.index', ['slugOrPath' => $wishlistItem->product->url_key]);
}
}

View File

@ -61,7 +61,7 @@ class CartController extends Controller
/**
* Method to populate the cart page which will be populated before the checkout process.
*
* @return \Illuminate\View\View
* @return \Illuminate\View\View
*/
public function index()
{
@ -96,7 +96,7 @@ class CartController extends Controller
$product = $this->productRepository->find($id);
return redirect()->route('shop.productOrCategory.index', ['slug' => $product->url_key]);
return redirect()->route('shop.productOrCategory.index', ['slugOrPath' => $product->url_key]);
}
return redirect()->back();

View File

@ -35,15 +35,14 @@
<div class="account-item-card mt-15 mb-15">
<div class="media-info">
<?php $image = $productImageHelper->getProductBaseImage($review->product); ?>
<a href="{{ url()->to('/').'/products/'.$review->product->url_key }}" title="{{ $review->product->name }}">
<a href="{{ route('shop.productOrCategory.index', $review->product->url_key) }}" title="{{ $review->product->name }}">
<img class="media" src="{{ $image['small_image_url'] }}"/>
</a>
<div class="info">
<div class="product-name">
<a href="{{ url()->to('/').'/products/'.$review->product->url_key }}" title="{{ $review->product->name }}">
{{$review->product->name}}
<a href="{{ route('shop.productOrCategory.index', $review->product->url_key) }}" title="{{ $review->product->name }}">
<span>{{ $review->product->name }}</span>
</a>
</div>