예제 #1
0
 public function show($id)
 {
     $delight = Delight::with('customer')->find($id);
     if ($delight->account_id != Auth::user()->account_id) {
         return redirect('/dashboard/delights');
     }
     return view('user.delights.show', compact('delight'));
 }
예제 #2
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');
 }