Refactor references to static facades. Improve budget controller code.

This commit is contained in:
James Cole
2018-07-14 16:08:34 +02:00
parent b8699422c8
commit 89834baf01
41 changed files with 284 additions and 246 deletions

View File

@@ -22,7 +22,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json;
use FireflyIII\Support\Facades\Preferences;
use Illuminate\Http\JsonResponse;
use Log;
@@ -104,7 +103,7 @@ class IntroController
$key .= '_' . $specialPage;
}
Log::debug(sprintf('Going to mark the following route as NOT done: %s with special "%s" (%s)', $route, $specialPage, $key));
Preferences::set($key, false);
app('preferences')->set($key, false);
return response()->json(['message' => trans('firefly.intro_boxes_after_refresh')]);
}
@@ -123,7 +122,7 @@ class IntroController
$key .= '_' . $specialPage;
}
Log::debug(sprintf('Going to mark the following route as done: %s with special "%s" (%s)', $route, $specialPage, $key));
Preferences::set($key, true);
app('preferences')->set($key, true);
return response()->json(['result' => sprintf('Reported demo watched for route "%s".', $route)]);
}