original_string: public function getUnsold()
      {
          $items = Auth::user()->items()
              ->with('purchases')
              ->where(function ($query) {
                  $query->has('purchases', 0)
                      ->where('end_date', '<', time())
                      ->where('auction', false)
                      ->orWhere(function ($query) {
                          $query->where('auction', true)
                              ->where('end_date', '<', time())
                              ->where('winning_bid_id', 0);
                      });
              });
  
          $table = new InventoryUnsold($items);
  
          return view('mustard::inventory.unsold', [
              'table' => $table,
              'items' => $table->paginate(),
          ]);
      }
code: public function getUnsold()
      {
          $items = Auth::user()->items()
              ->with('purchases')
              ->where(function ($query) {
                  $query->has('purchases', 0)
                      ->where('end_date', '<', time())
                      ->where('auction', false)
                      ->orWhere(function ($query) {
                          $query->where('auction', true)
                              ->where('end_date', '<', time())
                              ->where('winning_bid_id', 0);
                      });
              });
  
          $table = new InventoryUnsold($items);
  
          return view('mustard::inventory.unsold', [
              'table' => $table,
              'items' => $table->paginate(),
          ]);
      }
code_tokens: public function getUnsold ( ) { $ items = Auth :: user ( ) -> items ( ) -> with ( 'purchases' ) -> where ( function ( $ query ) { $ query -> has ( 'purchases' , 0 ) -> where ( 'end_date' , '<' , time ( ) ) -> where ( 'auction' , false ) -> orWhere ( function ( $ query ) { $ query -> where ( 'auction' , true ) -> where ( 'end_date' , '<' , time ( ) ) -> where ( 'winning_bid_id' , 0 ) ; } ) ; } ) ; $ table = new InventoryUnsold ( $ items ) ; return view ( 'mustard::inventory.unsold' , [ 'table' => $ table , 'items' => $ table -> paginate ( ) , ] ) ; }
docstring: Return the inventory unsold items view.
  
  @return \Illuminate\View\View
docstring_tokens: Return the inventory unsold items view .