1 year ago

Using a Count both where conditions in blade file.

Posted 1 year ago by RootTech

I have a table, 'Users' and columns Id,name,lastname,email,referrer,and so on.

I want to count for the number of people each user has referred.

in the blade file, I did @php($user = Auth::user()) @php($referrer = Db::table('users')where ($user,$user->referrer) )

then {{count($referrer)}}

I got, parameter must be an array error.... I don't have any idea what to do now.

help please...

Please sign in or create an account to participate in this conversation.