Added updated/created to locations API

This commit is contained in:
snipe
2017-03-10 22:09:21 -08:00
parent c132036f5c
commit caf2f648b1
2 changed files with 7 additions and 1 deletions
@@ -20,7 +20,8 @@ class LocationsController extends Controller
public function index(Request $request)
{
$this->authorize('view', Location::class);
$allowed_columns = ['id','name','address','address2','city','state','country','zip'];
$allowed_columns = ['id','name','address','address2','city','state','country','zip','created_at',
'updated_at'];
$locations = Location::select([
'locations.id',
@@ -32,6 +33,8 @@ class LocationsController extends Controller
'locations.zip',
'locations.country',
'locations.parent_id',
'locations.created_at',
'locations.updated_at',
'locations.currency'
])->withCount('assets')->withCount('users');