Group Settings

This commit is contained in:
David Bomba 2019-10-06 08:24:46 +11:00
parent d05e7fb845
commit 95be70a7b5
5 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,7 @@ class GroupSettingFactory
$gs = new GroupSetting;
$gs->name = '';
$gs->account_id = $company_id;
$gs->company_id = $company_id;
$gs->user_id = $user_id;
$gs->settings = json_encode([]);

View File

@ -36,7 +36,7 @@ class StoreGroupSettingRequest extends Request
return [
'name' => 'required',
'settings' => 'json',
]
];
}

View File

@ -32,8 +32,8 @@ class UpdateGroupSettingRequest extends Request
{
return [
'settings' => 'json'
]
'settings' => 'json',
];
}

View File

@ -33,6 +33,7 @@ class GroupSetting extends StaticModel
];
protected $fillable = [
'name',
'settings'
];

View File

@ -126,7 +126,7 @@ class RouteServiceProvider extends ServiceProvider
return \App\Models\Proposal::where('id', $this->decodePrimaryKey($value))->firstOrFail();
});
Route::bind('groupo_setting', function ($value) {
Route::bind('group_setting', function ($value) {
return \App\Models\GroupSetting::where('id', $this->decodePrimaryKey($value))->firstOrFail();
});