modified: app/Http/Controllers/GameController.php
This commit is contained in:
27
SRC/app/Http/Controllers/GameController.php
Normal file → Executable file
27
SRC/app/Http/Controllers/GameController.php
Normal file → Executable file
@ -110,4 +110,31 @@ class GameController extends Controller {
|
||||
return view('one_referent_game', ['referent' => $id, 'game' => $idGame]);
|
||||
}
|
||||
|
||||
public function setRecords($idTrophee) {
|
||||
|
||||
$values = Cookie::get('trophee');
|
||||
|
||||
if ($values === false)
|
||||
$values = [0, 0, 0];
|
||||
|
||||
switch ($idTrophee) {
|
||||
|
||||
case '1':
|
||||
$values[0]++;
|
||||
break;
|
||||
|
||||
case '2':
|
||||
$values[1]++;
|
||||
break;
|
||||
|
||||
case '3':
|
||||
$values[2]++;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
$response->withCookie(Cookie::forever('trophee', $values));
|
||||
}
|
||||
|
||||
}
|
||||
|
0
SRC/app/Http/Controllers/ImageController.php
Normal file → Executable file
0
SRC/app/Http/Controllers/ImageController.php
Normal file → Executable file
Reference in New Issue
Block a user