public function saveApplicationSettings()
 {
     foreach (ApplicationSetting::all() as $definition) {
         $value = Input::get("application-setting-" . $definition->id);
         if ($definition->type == "checkbox") {
             $value = $value == "on" ? 1 : 0;
         }
         if (isset($value)) {
             $definition->value = $value;
             $definition->save();
         }
     }
     return Redirect::to("/dashboard/storyteller/settings/application");
 }
 public static function get($key)
 {
     return ApplicationSetting::where('name', $key)->first()->value;
 }
Example #3
0
    return View::make('contact');
});
Route::get("/influence", function () {
    return View::make('influence');
});
Route::get("/larp101", function () {
    return Redirect::to(ApplicationSetting::get('LARP 101 PDF'));
});
Route::get("/larp101/doc", function () {
    return Redirect::to(ApplicationSetting::get('LARP 101 Google Doc'));
});
Route::get("/larp201", function () {
    return Redirect::to(ApplicationSetting::get('LARP 201 PDF'));
});
Route::get("/larp201/doc", function () {
    return Redirect::to(ApplicationSetting::get('LARP 201 Google Doc'));
});
Route::get("/uploads/{file}", 'HomeController@showUpload');
Route::post("/contact/send", 'HomeController@contactStorytellers');
Route::group(['prefix' => 'handbook'], function () {
    Route::get('/', function () {
        return View::make('handbook/viewPage')->with('name', 'The Handbook');
    });
    Route::get('/directory', function () {
        if (Auth::check()) {
            return View::make('handbook/directory');
        } else {
            return Redirect::to('/');
        }
    });
    Route::get('/create', function () {