mirror of https://github.com/4xmen/xshop.git
fixed bug setting first time by observer
parent
c55c8665d2
commit
0c3d21163a
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Setting;
|
||||
|
||||
class SettingObsever
|
||||
{
|
||||
/**
|
||||
* Handle the Setting "created" event.
|
||||
*/
|
||||
public function created(Setting $setting): void
|
||||
{
|
||||
//
|
||||
$setting->raw = $setting->value;
|
||||
$setting->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Setting "updated" event.
|
||||
*/
|
||||
public function updated(Setting $setting): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Setting "deleted" event.
|
||||
*/
|
||||
public function deleted(Setting $setting): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Setting "restored" event.
|
||||
*/
|
||||
public function restored(Setting $setting): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Setting "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Setting $setting): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue