{"action":"closed","issue":{"url":"https://api.github.com/repos/darryldecode/laravelshoppingcart/issues/2","labels_url":"https://api.github.com/repos/darryldecode/laravelshoppingcart/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/darryldecode/laravelshoppingcart/issues/2/comments","events_url":"https://api.github.com/repos/darryldecode/laravelshoppingcart/issues/2/events","html_url":"https://github.com/darryldecode/laravelshoppingcart/issues/2","id":58421114,"number":2,"title":"Problem getTotal() method","user":{"login":"cuautorres","id":4367529,"avatar_url":"https://avatars.githubusercontent.com/u/4367529?v=3","gravatar_id":"","url":"https://api.github.com/users/cuautorres","html_url":"https://github.com/cuautorres","followers_url":"https://api.github.com/users/cuautorres/followers","following_url":"https://api.github.com/users/cuautorres/following{/other_user}","gists_url":"https://api.github.com/users/cuautorres/gists{/gist_id}","starred_url":"https://api.github.com/users/cuautorres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuautorres/subscriptions","organizations_url":"https://api.github.com/users/cuautorres/orgs","repos_url":"https://api.github.com/users/cuautorres/repos","events_url":"https://api.github.com/users/cuautorres/events{/privacy}","received_events_url":"https://api.github.com/users/cuautorres/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-20T22:44:12Z","updated_at":"2015-02-23T13:00:44Z","closed_at":"2015-02-23T13:00:44Z","body":"Problem with getTotal method, if there are no conditions the total returns 0, I think convenient to put the condition: if $conditions->count() is false $newTotal = $subTotal"}}