mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Apply the "only" method to the providers controller
This commit is contained in:
parent
680d01d16f
commit
8fde7e5221
1 changed files with 35 additions and 0 deletions
|
@ -136,6 +136,23 @@ class Providers extends EA_Controller {
|
|||
|
||||
$provider = request('provider');
|
||||
|
||||
$this->providers_model->only($provider, [
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
'alt_number',
|
||||
'phone_number',
|
||||
'address',
|
||||
'city',
|
||||
'state',
|
||||
'zip_code',
|
||||
'notes',
|
||||
'is_private',
|
||||
'id_roles',
|
||||
'settings',
|
||||
'services',
|
||||
]);
|
||||
|
||||
$provider_id = $this->providers_model->save($provider);
|
||||
|
||||
$provider = $this->providers_model->find($provider_id);
|
||||
|
@ -167,6 +184,24 @@ class Providers extends EA_Controller {
|
|||
|
||||
$provider = request('provider');
|
||||
|
||||
$this->providers_model->only($provider, [
|
||||
'id',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
'alt_number',
|
||||
'phone_number',
|
||||
'address',
|
||||
'city',
|
||||
'state',
|
||||
'zip_code',
|
||||
'notes',
|
||||
'is_private',
|
||||
'id_roles',
|
||||
'settings',
|
||||
'services',
|
||||
]);
|
||||
|
||||
$provider_id = $this->providers_model->save($provider);
|
||||
|
||||
$provider = $this->providers_model->find($provider_id);
|
||||
|
|
Loading…
Reference in a new issue