public function user()
 {
     if (empty(Auth::user()->id)) {
         return redirect('/#/login');
     }
     $page_title = "Profile - MoneyMore";
     $page_descs = "";
     $quote = \App\MoneyQuote::orderByRaw("RAND()")->first();
     return view('user.user', compact('page_title', 'page_descs', 'quote'));
 }
 public function home()
 {
     $page_title = "moneymore!";
     $page_descs = "";
     $location = Location::get();
     $quote = \App\MoneyQuote::orderByRaw("RAND()")->first();
     if (Auth::user()) {
         if (Auth::user()->init_setup == 0) {
             return redirect("init_setup");
         }
     }
     return view('app', compact('page_title', 'page_descs', 'location', 'quote'));
 }
Exemple #3
0
//get the list of user goal
Route::post('ajax/showCompletedGoal', 'GoalsController@showCompletedGoal');
//get the list of user goal
Route::post('ajax/setGoalTravel', 'AjaxController@setGoalTravel');
Route::post('ajax/setGoalTarget', 'AjaxController@setGoalTarget');
Route::get('ajax/getUserTravelGoal', 'AjaxController@getUserTravelGoal');
Route::post('ajax/setCarGoal', 'AjaxController@setCarGoal');
//Set goal for car
Route::post('ajax/removeGoal', 'GoalsController@removeGoal');
//Set goal for car
//mails
Route::get('/mail_reg_confirm', function () {
    return view('mails.reg_confirm', compact('user'));
});
Route::get('/mail_weekly_update', function () {
    return view('mails.weekly_update');
});
//Init setup
Route::get('init_setup', function () {
    if (!Auth::user()) {
        return view('pages.login');
    }
    $page_title = "First time set up -  Moneyburi";
    $page_descs = "";
    if (Auth::user()->init_setup == 1) {
        return redirect("/");
    }
    $quote = \App\MoneyQuote::orderByRaw("RAND()")->first();
    return view('init_setup.init_setup', compact('page_title', 'page_descs', 'user_data', 'quote'));
});
//END INIT SETUP