From 62d9df125702a612b4a1eb524196f445c2fa5409 Mon Sep 17 00:00:00 2001 From: DonRenando Date: Wed, 18 Mar 2015 14:42:09 +0100 Subject: [PATCH] test --- SRC/app/Http/Controllers/GameController.php | 110 -------------------- 1 file changed, 110 deletions(-) delete mode 100755 SRC/app/Http/Controllers/GameController.php diff --git a/SRC/app/Http/Controllers/GameController.php b/SRC/app/Http/Controllers/GameController.php deleted file mode 100755 index 34d57ce..0000000 --- a/SRC/app/Http/Controllers/GameController.php +++ /dev/null @@ -1,110 +0,0 @@ - $nbOr]); - } - - public function playMemo($niveau) { - $idRef = Cookie::get('referent'); - $configjeu = Referent::find($idRef)->configjeu()->where('actifMemo', '=', '1')->first(); - if($configjeu && count($configjeu->oeuvres) >= 1) { - $oes = $configjeu->oeuvres; - } else { - $oes = Oeuvre::orderByRaw("RAND()")->take(5)->get(); - $niveau = 1; - } - $params = json_decode($configjeu->parametres); - - return view('frontend/memo', ['oeuvres' => $oes, 'niveau' => $niveau, 'nbBloc'=>$params->{"m".$niveau}]); - } - - public function chooseDifPuzzle() { - return view('frontend/puzzle_level'); - } - - public function playPuzzle($niveau) { - - $idRef = Cookie::get('referent'); - $ref = Referent::find($idRef); - $configjeu = $ref->configjeu()->where('actifPuzzle', '=', '1')->first(); - - if($configjeu && count($configjeu->oeuvres) >= 1) { - $oes = $configjeu->oeuvres; - $params = json_decode($configjeu->parametres); - $nbTab = $params->pt; - $dimension = $params->{ "p".$niveau}; - - } else { - $oes = Oeuvre::orderByRaw("RAND()")->take(5)->get(); - $nbTab = 3; - $dimension = 2; - } - - return view('frontend/puzzle', ['oeuvres' => $oes, 'dimension' => $dimension, 'nbTab' => $nbTab]); - - } - public function index() - { - $res = User::referents()->get(); - return view('home',['referent' => $res]); - } - - public function findReferents($reg) { - - $res = User::referents()->name($reg)->get(); - return Response::json($res->toArray()); - } - - /** - * Show referent games - * - * @param String $id - * @return Response - */ - public function showReferentGames($id) - { - $listeOeuvre = $ListeOeuvre = ListeOeuvre::ofUser($id)->activeListOeuvre()->first(); - if($listeOeuvre == '') - $games = []; - else - $games = $listeOeuvre->jeux()->get(); - - return view('referent_games', ['games' => $games]); - } - - /** - * Show one referent game - * - * @param String $id - * @param String $idGame - * @return Response - */ - public function showOneReferentGame($id, $idGame) - { - return view('one_referent_game', ['referent' => $id, 'game' => $idGame]); - } - -}