Sead Lab
Sead Lab

Reputation: 211

Laravel Dompdf Show Blank When Display Specific Data

When I use this query:

$admin = \App\Admin::all();

It works.

But when I use this query:

$admin = \App\Admin::where('status', "ACTIVE");

Its shows blank! Even though when I use this query to show data at blade file, it's works!

Why?

Upvotes: 1

Views: 74

Answers (1)

A.A Noman
A.A Noman

Reputation: 5270

You have to use like this If you want multiple result

$admin = \App\Admin::where('status', "ACTIVE")->get();

Or if you want a single result then use this

$admin = \App\Admin::where('status', "ACTIVE")->first();

Upvotes: 1

Related Questions