Fixed typo in comments and remove unnecessary cart load in CartRepository
This commit is contained in:
parent
759d360b2b
commit
11efdc68b2
|
|
@ -170,7 +170,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrive category from slug.
|
||||
* Retrieve category from slug.
|
||||
*
|
||||
* @param string $slug
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ class CartAddressFactory extends Factory
|
|||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'first_name' => $this->faker->firstName(),
|
||||
'last_name' => $this->faker->lastName,
|
||||
'email' => $this->faker->email,
|
||||
'first_name' => $this->faker->firstName(),
|
||||
'last_name' => $this->faker->lastName,
|
||||
'email' => $this->faker->email,
|
||||
'address_type' => CartAddress::ADDRESS_TYPE_BILLING,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ class CartRepository extends Repository
|
|||
*
|
||||
* @return Mixed
|
||||
*/
|
||||
|
||||
function model()
|
||||
{
|
||||
return 'Webkul\Checkout\Contracts\Cart';
|
||||
|
|
@ -23,9 +22,8 @@ class CartRepository extends Repository
|
|||
* @param int $cartId
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteParent($cartId) {
|
||||
$cart = $this->model->find($cartId);
|
||||
|
||||
public function deleteParent($cartId)
|
||||
{
|
||||
return $this->model->destroy($cartId);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue