Exemplo n.º 1
0
 public static function insertNewHistory($newhistory, $user_id)
 {
     foreach ($newhistory as $row) {
         $newrow = array('game_id' => $row['game_id'], 'user_id' => $user_id, 'positionid' => $row['positionid'], 'letter' => $row['letter']);
         \App\Models\GameHistory::create($newrow);
     }
 }
Exemplo n.º 2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request)
 {
     \App\Models\GameHistory::create(\Input::all());
 }
Exemplo n.º 3
0
 /**
  * @param  Request $request
  * @return Response
  */
 public function history(Request $request)
 {
     return view('lots.history', ['history' => GameHistory::with('user', 'game', 'game.lot')->take(10)->get()]);
 }
Exemplo n.º 4
0
 public function InsertHistory(Request $request)
 {
     $history = $request->history;
     GameHistory::insertNewHistory($history, \Auth::User()->id);
 }