Various updates.

This commit is contained in:
James Cole
2021-04-04 08:31:15 +02:00
parent f8c725e5b2
commit 85b22341a4
41 changed files with 161 additions and 54 deletions

View File

@@ -186,6 +186,9 @@ class BelongsUser implements Rule
*/
private function validateBillId(int $value): bool
{
if (0 === $value) {
return true;
}
$count = Bill::where('id', '=', $value)->where('user_id', '=', auth()->user()->id)->count();
return 1 === $count;