dimanche 29 avril 2018

Error : htmlspecialchars() expects parameter 1 to be string, object given

Error : ErrorException (E_ERROR) htmlspecialchars() expects parameter 1 to be string, object given

Help me understand and get rid of such errors. Currently in my controller :

public function cartreview(Request $request,$sp_id, $service_id,$cart_id)
     {
     total = DB::table('pricings')
     ->join('carts', 'carts.sp_id', '=', 'pricings.sp_id')
     ->select(DB::raw('sum(pricings.Shirt*carts.q_Shirt) AS total_price'))
     ->where('pricings.sp_id', '=', $sp_id)
     ->where('carts.id', '=' , $cart_id)
     ->first();

    return view('user.cartreview')->with('total', $total );
}

In view:



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire