示例#1
0
 public function update($matchId, MatchUpdate $request)
 {
     /**
      * @var $match Match
      */
     $match = Match::findOrFail($matchId);
     $match->update($request->get('match'));
     return $this->response->collection(Match::where(['id' => $matchId])->get(), new MatchTransformer(), 'matches');
 }
 /**
  * Gets the desired model.
  *
  * @param $id
  *
  * @throws Illuminate\Database\Eloquent\ModelNotFoundException
  *
  * @return Model
  */
 public function get($id)
 {
     return Match::findOrFail($id);
 }