Merge branch 'develop' of https://github.com/snipe/snipe-it into develop

This commit is contained in:
snipe 2018-11-02 17:15:08 -07:00
commit b6daad7573

View file

@ -103,12 +103,17 @@ class Setting extends Model
* *
* @since 5.0.0 * @since 5.0.0
* *
* @return \App\Models\Setting * @return \App\Models\Setting|null
*/ */
public static function getSettings() public static function getSettings(): ?Setting
{ {
return Cache::rememberForever(self::APP_SETTINGS_KEY, function () { return Cache::rememberForever(self::APP_SETTINGS_KEY, function () {
return self::first(); // Need for setup as no tables exist
try {
return self::first();
} catch (\Throwable $th) {
return null;
}
}); });
} }