Hello everyone, This is EDK from wakabia tech company. I brought to you guys a solution to a common but tricky issue you might come across in laravel.
INSIGHT :
1. It might be that you upgraded your Laravel
2. It might be that you are new in Laravel framwork
3. It might be that you downgraded your Laravel
So the below error or similar error
ERROR: Argument 1 passed to Illuminate\Database\Query\Builder::cleanBindings() must be of the type array, null given
Might come up when you want to perform a query from database using a clouse whereIn('user_id', $userId)
Or different from what you are doing. See the solution below
SOLUTION
public function index(){
$users = auth()->user();
$userId = $users->id;
//querying from receivers table, calling its class Receiver::
$receivers = Receiver::select('*')
->get()
->whereIn('user_id', $userId);
return view('receiver.blade', compact('users','receivers'));
Call for assistance or for a contract discussion in building your platform
+2347063076212
READ MORE:
Let us build a website for you - We can as well build Android and IOS App for you
SHARE THIS POST
0 comments:
Post a Comment