Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
package
laravelshoppingcart
Commits
d42b767b
Commit
d42b767b
authored
Aug 24, 2016
by
Thorsten Buss
Browse files
add hasCondition to Cart
parent
24eefdb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Cart/Cart.php
View file @
d42b767b
...
...
@@ -349,6 +349,16 @@ class Cart implements Jsonable, \JsonSerializable, Arrayable{
return
$this
->
getConditions
()
->
get
(
$conditionName
);
}
/**
* check if condition exists on the cart by its name
*
* @param $conditionName
* @return Condition
*/
public
function
hasCondition
(
$conditionName
)
{
return
$this
->
getConditions
()
->
has
(
$conditionName
);
}
/**
* Get all the condition filtered by Type
* Please Note that this will only return condition added on cart bases, not those conditions added
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment