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(),
        ]);
    }
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(),
        ]);
    }
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 ( ) , ] ) ; }
Return the inventory unsold items view.

@return \Illuminate\View\View
Return the inventory unsold items view .