(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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user