Ejemplo n.º 1
0
 public function store(BatchRequest $request)
 {
     $input = $request->all();
     // Create new Batch and add date/times
     $batch = new Batch($input);
     $batch->created_at = Carbon::now();
     $batch->updated_at = Carbon::now();
     // Add the authenticated user as the batch creator
     \Auth::user()->batches()->save($batch);
     return redirect('batches');
 }