diff --git a/app/Http/Controllers/Users/AgencyController.php b/app/Http/Controllers/Users/AgencyController.php
index 5a4bc7a..5980583 100644
--- a/app/Http/Controllers/Users/AgencyController.php
+++ b/app/Http/Controllers/Users/AgencyController.php
@@ -30,6 +30,7 @@ class AgencyController extends Controller
'email' => 'required|email|max:255',
'website' => 'required|url|max:255',
'address' => 'required|string|max:255',
+ 'city' => 'required|string|max:100',
'phone' => 'required|string|max:255',
]);
@@ -38,6 +39,7 @@ class AgencyController extends Controller
Option::set('agency_email', request('email'));
Option::set('agency_website', request('website'));
Option::set('agency_address', request('address'));
+ Option::set('agency_city', request('city'));
Option::set('agency_phone', request('phone'));
flash(trans('agency.updated'), 'success');
diff --git a/resources/lang/id/address.php b/resources/lang/id/address.php
index 78f1038..89725c5 100644
--- a/resources/lang/id/address.php
+++ b/resources/lang/id/address.php
@@ -9,5 +9,6 @@ return [
'village' => 'Kelurahan/Desa',
'district' => 'Kecamatan',
'municipality' => 'Kota/Kab.',
+ 'city' => 'Kota',
'province' => 'Propinsi',
-];
\ No newline at end of file
+];
diff --git a/resources/views/users/agency/edit.blade.php b/resources/views/users/agency/edit.blade.php
index 7a1d510..c559351 100644
--- a/resources/views/users/agency/edit.blade.php
+++ b/resources/views/users/agency/edit.blade.php
@@ -21,6 +21,7 @@
{!! FormField::text('phone', ['value' => Option::get('agency_phone')]) !!}
{!! FormField::textarea('address', ['value' => Option::get('agency_address')]) !!}
+ {!! FormField::text('city', ['value' => Option::get('agency_city')]) !!}
{!! FormField::text('website', ['value' => Option::get('agency_website')]) !!}
{{ Form::close() }}
diff --git a/resources/views/users/agency/show.blade.php b/resources/views/users/agency/show.blade.php
index 821f740..1bb8d14 100644
--- a/resources/views/users/agency/show.blade.php
+++ b/resources/views/users/agency/show.blade.php
@@ -24,6 +24,7 @@
| {{ trans('contact.email') }} | {{ Option::get('agency_email') }} |
| {{ trans('contact.phone') }} | {{ Option::get('agency_phone') }} |
| {{ trans('address.address') }} | {!! nl2br(Option::get('agency_address')) !!} |
+ | {{ trans('address.city') }} | {{ Option::get('agency_city') }} |
| {{ trans('contact.website') }} | {{ Option::get('agency_website') }} |
diff --git a/tests/Feature/AgencyProfileTest.php b/tests/Feature/AgencyProfileTest.php
index d823bc7..1eb0794 100644
--- a/tests/Feature/AgencyProfileTest.php
+++ b/tests/Feature/AgencyProfileTest.php
@@ -31,6 +31,7 @@ class AgencyProfileTest extends TestCase
'email' => 'nama_agensi@domain.com',
'address' => 'Jln. Kalimantan, No. 20, Kota',
'phone' => '081234567890',
+ 'city' => 'Jakarta',
'website' => 'https://example.com',
]);
@@ -50,6 +51,10 @@ class AgencyProfileTest extends TestCase
'value' => 'Jln. Kalimantan, No. 20, Kota',
]);
$this->seeInDatabase('site_options', [
+ 'key' => 'agency_city',
+ 'value' => 'Jakarta',
+ ]);
+ $this->seeInDatabase('site_options', [
'key' => 'agency_phone',
'value' => '081234567890',
]);