예제 #1
0
 public function index()
 {
     $customers = Customer::where('account_id', Auth::user()->account_id)->get();
     $delights = Delight::where('account_id', Auth::user()->account_id)->get();
     if (count($customers) > 0) {
         return view('user.dashboard', compact('customers', 'delights'));
     }
     return view('user.blank-slate');
 }
예제 #2
0
 public function index()
 {
     $sent_delights = Delight::where('account_id', Auth::user()->account_id)->where('status', 'Sent')->get();
     $pending_delights = Delight::where('account_id', Auth::user()->account_id)->where('status', 'Pending')->get();
     return view('user.delights.index', compact('sent_delights', 'pending_delights'));
 }