Convert raw usage of the session model to the repository

This commit is contained in:
Graham Campbell
2015-12-23 15:19:09 +00:00
parent 4718d07561
commit 94ffa5462f
3 changed files with 21 additions and 21 deletions

View File

@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers;
use CachetHQ\Cachet\Models\Setting;
use CachetHQ\Cachet\Facades\Setting;
use CachetHQ\Cachet\Models\User;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
@@ -166,10 +166,7 @@ class SetupController extends Controller
$settings = array_pull($postData, 'settings');
foreach ($settings as $settingName => $settingValue) {
Setting::create([
'name' => $settingName,
'value' => $settingValue,
]);
Setting::set($settingName, $settingValue);
}
$envData = array_pull($postData, 'env');