Trying to get property of non-object error on db view

Posted 1 year ago by muazzamazaz

Getting db view results but error of non-object while view contains rows

$top_revenue_users = DB::table('user_requests')->orderBy('total', 'desc')->take(3);

ody>   
    @foreach ($top_revenue_users as $rc2)
    <tr>
    <td>{{$rc2->first_name}}</td>
    <td>{{$rc2->last_name}}</td>
    <td>{{$rc2->email}}</td>
    
    @endforeach

Trying to get property of non-object

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

Reply to

Use Markdown with GitHub-flavored code blocks.