Example #1
0
 public function edit($id)
 {
     $batches = Batch::all();
     foreach ($batches as $batch) {
         $batchDropdownArray[$batch->id] = $batch->id;
     }
     $package = Package::findorfail($id);
     $package->formatedDateTime = date("d.m.Y H:i", strtotime($package->unpackingDateTime));
     for ($i = 1; $i < 21; $i++) {
         $recepientsDropdownArray[$i] = $i;
     }
     return View::make("delivery::package.edit", compact('package'))->with('batchDropdownArray', $batchDropdownArray)->with('recepientsDropdownArray', $recepientsDropdownArray);
 }
Example #2
0
 public function destroy($id)
 {
     Batch::find($id)->delete();
     return Redirect::route("batch.index");
 }