From 8fde7e5221963d035f21ed8d929ecdf9b8c18dea Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 27 Jun 2022 11:27:46 +0300 Subject: [PATCH] Apply the "only" method to the providers controller --- application/controllers/Providers.php | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/application/controllers/Providers.php b/application/controllers/Providers.php index 21cc8960..a706ceb3 100644 --- a/application/controllers/Providers.php +++ b/application/controllers/Providers.php @@ -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);