Exemple #1
0
 public function showRegister()
 {
     $settings = Setting::getAll();
     if ($settings->registerActivate) {
         return view('users.register');
     } else {
         return "Register is disabled.";
     }
 }
 public function postSettings(Request $request)
 {
     $appTitle = $request->get('app-title');
     $adminURL = $request->get('admin-url');
     $registerURL = $request->get('register-url');
     $loginURL = $request->get('login-url');
     $appActivate = false;
     $loginActivate = false;
     $registerActivate = false;
     if ($request->has('app-activate')) {
         $appActivate = true;
     }
     if ($request->has('login-activate')) {
         $loginActivate = true;
     }
     if ($request->has('register-activate')) {
         $registerActivate = true;
     }
     Setting::save(array('login_act' => $loginActivate, 'reg_act' => $registerActivate));
     return redirect()->back();
 }