Add postal code to locations listing

This commit is contained in:
snipe 2016-11-16 08:22:54 -08:00
parent 2ef4b58a8c
commit 84e06f4642
2 changed files with 5 additions and 1 deletions

View file

@ -318,7 +318,7 @@ class LocationsController extends Controller
$locations = $locations->OrderParent($order);
break;
default:
$allowed_columns = ['id','name','address','city','state','country','currency'];
$allowed_columns = ['id','name','address','city','state','country','currency','zip'];
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
$locations = $locations->orderBy($sort, $order);
@ -344,6 +344,7 @@ class LocationsController extends Controller
'address' => ($location->address) ? e($location->address): '',
'city' => e($location->city),
'state' => e($location->state),
'zip' => e($location->zip),
'country' => e($location->country),
'currency' => e($location->currency),
'actions' => $actions

View file

@ -41,6 +41,9 @@
<th data-searchable="true" data-sortable="true" data-field="state">
{{ trans('admin/locations/table.state') }}
</th>
<th data-searchable="true" data-sortable="true" data-field="zip">
{{ trans('admin/locations/table.zip') }}
</th>
<th data-searchable="true" data-sortable="true" data-field="country">
{{ trans('admin/locations/table.country') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>