Improve code quality.

This commit is contained in:
James Cole
2018-07-09 19:24:08 +02:00
parent 76386dad7d
commit 5665f127aa
55 changed files with 278 additions and 100 deletions

View File

@@ -326,6 +326,7 @@ class BillController extends Controller
$return = 'true';
}
$group = null;
// find first rule group, or create one:
$count = $this->ruleGroupRepos->count();
if (0 === $count) {
@@ -336,7 +337,7 @@ class BillController extends Controller
$group = $this->ruleGroupRepos->store($data);
}
if ($count > 0) {
$group = $this->ruleGroupRepos->getActiveGroups(auth()->user())->first();
$group = $this->ruleGroupRepos->getActiveGroups($bill->user)->first();
}
// redirect to page that will create a new rule.