/**
  * Update a Theme.
  *
  * @return Response
  */
 public function update($id)
 {
     $theme = \App\Themes::where('id', '=', $id)->first();
     $theme->theme_name = $_POST['themeName'];
     $theme->save();
     header('Location:' . url() . '/admin/theme');
     exit;
 }
예제 #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update()
 {
     \Auth::user()->name = $_POST['name'];
     \Auth::user()->email = $_POST['email'];
     $theme = \App\Themes::where('theme_name', '=', $_POST['theme'])->first();
     \Auth::user()->theme_id = $theme->id;
     if (isset($_POST['password'])) {
         \Auth::user()->password = bcrypt($_POST['password']);
     }
     \Auth::user()->save();
     header('Location:' . url() . '/settings');
     exit;
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $themes = \App\Themes::all();
     $site_theme = \App\SiteTheme::first();
     $user_privileges = new \App\user_privileges();
     $user_privileges = $user_privileges->first();
     $add_categories = $user_privileges->add_categories;
     $search_users = $user_privileges->search_users;
     $post_editor = $user_privileges->full_post_editor;
     $change_theme = $user_privileges->change_theme;
     $default_theme = \App\Themes::where('id', '=', $site_theme->default_theme_id)->get()[0];
     $data = array('active_nav' => $this->active_nav, 'site_theme' => $site_theme, 'default_theme' => $default_theme, 'themes' => $themes, 'add_categories' => $add_categories, 'search_users' => $search_users, 'post_editor' => $post_editor, 'change_theme' => $change_theme);
     return view('includes/admin/settings')->with($data);
 }