Try using ->first() instead of ->get()
$container = Transaction::where('transaction_type', 'deliver')->select(array(DB::raw('SUM(quantity) AS deliver')))->first();
$container1 = Transaction::where('transaction_type', 'pick-up')->select(array(DB::raw('SUM(quantity) AS pickup')))->first();
If you need the deliver and pickup sums for different transactions, you are lacking a group by clause, maybe by date, as you are grouping in the first clause.