Exemplo n.º 1
0
 public function getBatchID()
 {
     $chapterid = Input::get('chapterid');
     Session::put('chapterid', $chapterid);
     $batchentry = new BatchEntry();
     return Response::json(['batchid' => $batchentry->startEntry($chapterid)]);
 }
Exemplo n.º 2
0
 public function startEntry($chapterid)
 {
     $batchentry = new BatchEntry();
     $batchentry->chapter_id = $chapterid;
     $batchentry->user_id = Auth::id();
     $batchentry->start_time = date('Y-m-d H:i:s');
     $batchentry->save();
     Session::put('entryStarted', true);
     Session::put('currentbatchid', $batchentry->id);
     return $batchentry->id;
 }