Skip to content

Commit

Permalink
refs #208
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Feb 20, 2018
1 parent 01c91b2 commit 6e2c1f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 4 additions & 7 deletions app/Http/Controllers/Settings/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
use App\Models\Setting\Tax;
use App\Traits\DateTime;
use App\Traits\Uploads;
use App\Utilities\Installer;
use App\Utilities\Modules;
use DotenvEditor;

class Settings extends Controller
{
Expand Down Expand Up @@ -136,12 +136,9 @@ public function update(Request $request)
// Change default locale if only 1 company
if (($key == 'default_locale') && ($companies == 1)) {
// Update .env file
DotenvEditor::setKeys([
[
'key' => 'APP_LOCALE',
'value' => $value,
],
])->save();
Installer::updateEnv([
'APP_LOCALE' => $value
]);
}

setting()->set('general.' . $key, $value);
Expand Down
2 changes: 0 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
EloquentFilter\ServiceProvider::class,
Fideloper\Proxy\TrustedProxyServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
Jackiedo\DotenvEditor\DotenvEditorServiceProvider::class,
Jenssegers\Date\DateServiceProvider::class,
Kyslik\ColumnSortable\ColumnSortableServiceProvider::class,
Laracasts\Flash\FlashServiceProvider::class,
Expand Down Expand Up @@ -263,7 +262,6 @@
'Charts' => ConsoleTVs\Charts\Facades\Charts::class,
'Debugbar' => Barryvdh\Debugbar\Facade::class,
'Date' => Jenssegers\Date\Date::class,
'DotenvEditor' => Jackiedo\DotenvEditor\Facades\DotenvEditor::class,
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
Expand Down

0 comments on commit 6e2c1f0

Please sign in to comment.