|
@@ -27,11 +27,11 @@ |
|
|
block discarded – undo |
|
27
|
27
|
DB::table('users_codes')->insert(['fk_users' => Auth::user()->id, 'fk_game_codes' => $rawQR[0]->id]); |
|
28
|
28
|
$checkExists = DB::select('SELECT * FROM users RIGHT JOIN users_codes ON users.id = users_codes.fk_users RIGHT JOIN game_codes ON users_codes.fk_game_codes = game_codes.id WHERE name_gen = ? AND game_code = ?;', [Auth::user()->name_gen, $param]); |
|
29
|
29
|
$checkExists = json_decode(json_encode($checkExists)); |
|
30
|
|
- $view = view('user.scan', ['checkExists' => $checkExists,'maxPoints' => $maxPoints,'first' => 1]); |
|
|
30
|
+ $view = view('user.scan', ['checkExists' => $checkExists, 'maxPoints' => $maxPoints, 'first' => 1]); |
|
31
|
31
|
} else { |
|
32
|
32
|
$checkExists = DB::select('SELECT * FROM users RIGHT JOIN users_codes ON users.id = users_codes.fk_users RIGHT JOIN game_codes ON users_codes.fk_game_codes = game_codes.id WHERE name_gen = ? AND game_code = ?;', [Auth::user()->name_gen, $param]); |
|
33
|
33
|
$checkExists = json_decode(json_encode($checkExists)); |
|
34
|
|
- $view = view('user.scan', ['checkExists' => $checkExists,'maxPoints' => $maxPoints])->withErrors('Der Code wurde bereits gezählt.'); |
|
|
34
|
+ $view = view('user.scan', ['checkExists' => $checkExists, 'maxPoints' => $maxPoints])->withErrors('Der Code wurde bereits gezählt.'); |
|
35
|
35
|
} |
|
36
|
36
|
|
|
37
|
37
|
$this->calcTotalPoints(Auth::user()->name_gen); |
Please login to merge, or discard this patch.