Changed SITE_SETUP to SITE, using ->address instead of ->address(), added email_log, is now in views
This commit is contained in:
@@ -23,7 +23,7 @@ trait NextKey
|
||||
$model->id = self::NextId();
|
||||
|
||||
if (! $model->site_id)
|
||||
$model->site_id = config('SITE_SETUP')->id;
|
||||
$model->site_id = config('SITE')->id;
|
||||
});
|
||||
|
||||
static::saved(function($model)
|
||||
@@ -40,14 +40,14 @@ trait NextKey
|
||||
|
||||
$mo = new Module;
|
||||
$mo->name = $model::RECORD_ID;
|
||||
$mo->site_id = $model->site_id ?: config('SITE_SETUP')->id;
|
||||
$mo->site_id = $model->site_id ?: config('SITE')->id;
|
||||
$mo->save();
|
||||
}
|
||||
|
||||
if (! $mo->record) {
|
||||
$mo->record = new Record;
|
||||
$mo->record->module_id = $mo->id;
|
||||
$mo->record->site_id = $model->site_id ?: config('SITE_SETUP')->id;
|
||||
$mo->record->site_id = $model->site_id ?: config('SITE')->id;
|
||||
}
|
||||
|
||||
$mo->record->id = $model->id;
|
||||
|
Reference in New Issue
Block a user