fixed settings cache
This commit is contained in:
parent
cd5341e9d3
commit
44edf993c7
@ -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);
|
||||
|
||||
|
@ -40,10 +40,10 @@ class UpdateCompany extends Job
|
||||
$this->company->update($this->request->all());
|
||||
|
||||
// Clear current settings
|
||||
setting()->setExtraColumns(['company_id' => $this->company->id]);
|
||||
setting()->forgetAll();
|
||||
|
||||
// Load settings based on the given company
|
||||
setting()->setExtraColumns(['company_id' => $this->company->id]);
|
||||
setting()->load(true);
|
||||
|
||||
if ($this->request->has('name')) {
|
||||
|
@ -26,8 +26,8 @@ class Accounts extends Seeder
|
||||
{
|
||||
$company_id = $this->command->argument('company');
|
||||
|
||||
setting()->forgetAll();
|
||||
setting()->setExtraColumns(['company_id' => $company_id]);
|
||||
setting()->forgetAll();
|
||||
|
||||
$rows = [
|
||||
[
|
||||
|
Loading…
x
Reference in New Issue
Block a user