public function postForm(MatchRequest $request, MatchRepository $matchRepository)
 {
     $matchRepository->save($request->input('team_1'), $request->input('score_team_1'), $request->input('team_2'), $request->input('score_team_2'), $request->input('date'), $request->input('id_calendar'));
     $name = $request->input('team_1');
     $id_team = DB::table('team')->where('name', $name)->orderBy('id_team', 'desc')->pluck('id_team');
     $id_calendar = $request->input('id_calendar');
     $id_match = DB::table('match_detail')->where('team_1', $name)->where('id_calendar', $id_calendar)->orderBy('id_match', 'desc')->pluck('id_match');
     //dd($id_team);
     return view('player')->with('id_team', $id_team)->with('number', 1)->with('id_match', $id_match);
 }
Example #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param Match $match
  * @param MatchRequest $request
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function update(Match $match, MatchRequest $request)
 {
     $match->update($request->all());
     return redirect('tekme');
 }