app/Http/Controllers/Buyer/BuyerSellerController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Buyer $buyer)
    {
        $sellers = $buyer->transactions()-> with('product.seller')
                                         -> get()
                                         -> pluck('product.seller')
                                         -> unique('id');
        return $this -> showAll($sellers);
    }
public function index ( Buyer $ buyer ) { $ sellers = $ buyer -> transactions ( ) -> with ( 'product.seller' ) -> get ( ) -> pluck ( 'product.seller' ) -> unique ( 'id' ) ; return $ this -> showAll ( $ sellers ) ; }
Display a listing of the resource.
Display a listing of the resource .