fixed settings
This commit is contained in:
parent
1ee55af5a0
commit
f80fc4d310
|
|
@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
class Setting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'settings';
|
||||
protected $fillable = ['name', 'value', 'json'];
|
||||
protected $fillable = ['type', 'space', 'name', 'value', 'json'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
namespace Beike\Repositories;
|
||||
|
||||
use Beike\Models\Cart;
|
||||
use Beike\Models\Setting;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class SettingRepo
|
||||
{
|
||||
|
|
@ -59,7 +61,9 @@ class SettingRepo
|
|||
'space' => $code,
|
||||
'name' => $name,
|
||||
'value' => (string)$value,
|
||||
'json' => 0
|
||||
'json' => 0,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
}
|
||||
Setting::query()->insert($rows);
|
||||
|
|
|
|||
Loading…
Reference in New Issue