on-internet
← Community

How to define null collection for returning into blade

Stack Overflow ·

I have this method: public function __invoke(Request $request) { $sliders = DB::table('sliders')->get(); $statics = DB::table('static_pages_fields')->get(); $plans = DB::table('plans')->get(); $customers = DB::table('customers')->get(); $features = DB::table('plan_features')->get(); return view('frontend.index', compact('sliders','statics','plans','features','customers')); } I want to return `$customers` as null collection ? How to do that

Comments

Sign in or sign up to comment and upvote.

No comments yet.