Example #1
0
 /**
  * Create new tournament
  *
  * @param CreateTournament $request
  * @return array
  */
 public function store(CreateTournament $request)
 {
     $input = $request->input('tournament');
     $input['status'] = Tournament::STATUS_DRAFT;
     $tournament = Tournament::create($input);
     return $this->response->collection(Tournament::where(['id' => $tournament->id])->get(), new TournamentTransformer($this->response), 'tournaments');
 }
 public function run()
 {
     Tournament::create(['id' => '1', 'name' => 'Friendly', 'team_id' => 1]);
 }
 public function store(TournamentRequest $request)
 {
     Tournament::create($request->all());
     Flash::success(trans('general.created_msg'));
     return redirect(route('admin.tournaments'));
 }
Example #4
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     Tournament::create(Request::all());
     return redirect('tournament');
 }