(develop) Fix asset auto-incrementation (#6806)

* Fix auto-increment not updating

This is due to the addition of caching for settings.  If we're not
explicitly saving the Settings model, then the cache isn't getting
updated, causing the asset tag auto-increment to get an old cached
version with the wrong number

* Move Setting cache clear to an observer
This commit is contained in:
Martin Meredith
2019-03-13 17:58:35 +00:00
committed by snipe
parent a462e91983
commit f403db274a
6 changed files with 35 additions and 64 deletions
-11
View File
@@ -3,13 +3,11 @@
namespace App\Models;
use Parsedown;
use App\Events\SettingSaved;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Cache;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Watson\Validating\ValidatingTrait;
use Schema;
use Illuminate\Support\Collection;
/**
@@ -42,15 +40,6 @@ class Setting extends Model
*/
protected $injectUniqueIdentifier = true;
/**
* The event map for the model.
*
* @var array
*/
protected $dispatchesEvents = [
'saved' => SettingSaved::class,
];
/**
* Model rules.
*