Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/cholladay0816/CreatorCore
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
cholladay0816 committed Sep 6, 2023
2 parents cd4fd3e + 76e1376 commit 2f57728
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/Models/CommissionPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ public static function booted()
static::created(function ($preset) {
$preset->slug = $preset->getSlug();
});
static::updating(function($preset) {
if($preset->isDirty('image_path'))
{
static::updating(function ($preset) {
if($preset->isDirty('image_path')) {
Storage::delete($preset->getOriginal('image_path'));
}
});
static::deleting(function($preset) {
static::deleting(function ($preset) {
Storage::delete($preset->image_path);
});
static::factory(function ($preset) {
Expand Down

0 comments on commit 2f57728

Please sign in to comment.