public function getBatchID() { $chapterid = Input::get('chapterid'); Session::put('chapterid', $chapterid); $batchentry = new BatchEntry(); return Response::json(['batchid' => $batchentry->startEntry($chapterid)]); }
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; }