I've trying to basically do two SQL requests into one laravel array.
These are my SQL
SELECT * FROM `transactions` WHERE `plan` LIKE '1050' ORDER BY `updated_at` DESC
SELECT * FROM `transactions` WHERE `user` LIKE '1050' ORDER BY `updated_at` DESC
I want to have all transaction that have "plan" == "1050" AND all transactions that have "user" == "1050" in one variable.
This is not working for me:
$ct=transactions::where('user',$user->id)
->orWhere('plan', $user->id)
->orderby('created_at',"asc")->get();