fixed settings cache

This commit is contained in:
denisdulici
2020-01-01 00:53:47 +03:00
parent cd5341e9d3
commit 44edf993c7
3 changed files with 6 additions and 7 deletions

View File

@ -29,11 +29,12 @@ class CreateCompany extends Job
*/
public function handle()
{
// Clear settings
setting()->forgetAll();
$this->company = Company::create($this->request->all());
// Clear settings
setting()->setExtraColumns(['company_id' => $this->company->id]);
setting()->forgetAll();
$this->callSeeds();
$this->updateSettings();
@ -64,8 +65,6 @@ class CreateCompany extends Job
protected function updateSettings()
{
setting()->setExtraColumns(['company_id' => $this->company->id]);
if ($this->request->file('logo')) {
$company_logo = $this->getMedia($this->request->file('logo'), 'settings', $this->company->id);