modified: app/Http/Controllers/GameController.php
This commit is contained in:
SRC
app
Http
Controllers
public
css
fonts
glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woffglyphicons-halflings-regular.woff2
imgs
Search.pngadminbg.jpgadminbgOrgi.jpg
avatar
bg.jpgfavicon.icogames.pnghome.pngmemo
previouspage.pngpuzzle.jpgpuzzle
trophees
js
resources
views
auth
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