/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     DB::connection()->enableQueryLog();
     $filter = array_replace(['type' => 'all', 'day' => 'any', 'sizes' => [], 'specs' => [], 'via' => ['Hamburg', '', '', 'Berlin'], 'sort' => 'price desc'], Input::get('filter', []));
     $shipments = Shipment::ofType($filter['type'])->via($filter['via'])->shipsOn($filter['day'])->onlySizes($filter['sizes'])->withoutSpecs('specs', $filter['specs'])->get();
     $shipments = $this->sortShipments($shipments, $filter['sort']);
     return view('shipments.index')->with('shipments', $shipments)->with('filter', $filter)->with('sizes', Size::all())->with('specs', Spec::all());
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($shipment)
 {
     $shipment = Auth::user()->shipments()->withUnpublished()->findOrFail($shipment);
     $specs = Spec::all();
     return view('shipments.edit.spec.index')->with('shipment', $shipment)->with('spec', $specs);
 }