Changed SITE_SETUP to SITE, using ->address instead of ->address(), added email_log, is now in views

This commit is contained in:
Deon George
2021-07-02 09:12:34 +10:00
parent c34da6bfb8
commit 34139bcbc2
19 changed files with 124 additions and 144 deletions

View File

@@ -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;