From 11a20c5be971d97f4a4f575f91b706791c1893a9 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 26 Apr 2015 23:29:17 +0200 Subject: Competitions; CompetitionTypes; Participants; better routing; administrators; ... --- src/controllers/GameController.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/controllers/GameController.php (limited to 'src/controllers/GameController.php') diff --git a/src/controllers/GameController.php b/src/controllers/GameController.php new file mode 100644 index 0000000..3ef9c37 --- /dev/null +++ b/src/controllers/GameController.php @@ -0,0 +1,36 @@ +game = $game; + } + + public function index() { + return $this->game->all(); + } + + public function show($id) { + return $this->game->findOrFail($id); + } + + public function update($id) { + throw new \Exception("Not implemented yet."); + } + + public function store() { + $this->game->fill(Input::all()); + + if ($this->game->save()) { + return $this->response->created(); + } else { + throw new Dingo\Api\Exception\StoreResourceFailedException; + } + } + +} \ No newline at end of file -- cgit v1.2.3