Example #1
0
 /**
  * Show the settings dashboard.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function show(Request $request)
 {
     $data = ['activeTab' => $request->get('tab', Spark::firstSettingsTabKey()), 'invoices' => [], 'user' => $this->users->getCurrentUser()];
     if (Auth::user()->stripe_id) {
         $data['invoices'] = Cache::remember('spark:invoices:' . Auth::id(), 30, function () {
             return Auth::user()->invoices();
         });
     }
     return view('spark::settings.dashboard', $data);
 }