app/Http/Controllers/Seller/SellerTransactionController.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(User $seller)
    {
        $transactions = $seller->products()
            ->whereHas('transactions')
            ->with('transactions')
            ->get()
            ->pluck('transactions')
            ->collapse();
        return $this->showAll(new UserCollection($transactions));
    }
public function index ( User $ seller ) { $ transactions = $ seller -> products ( ) -> whereHas ( 'transactions' ) -> with ( 'transactions' ) -> get ( ) -> pluck ( 'transactions' ) -> collapse ( ) ; return $ this -> showAll ( new UserCollection ( $ transactions ) ) ; }
Display a listing of the resource.
Display a listing of the resource .