Added escaping

This commit is contained in:
snipe 2017-01-24 19:24:47 -08:00
parent 945d910ca2
commit c907414e71

View file

@ -21,25 +21,23 @@ class LicensesTransformer
{ {
$array = [ $array = [
'id' => $license->id, 'id' => $license->id,
'name' => $license->name, 'name' => e($license->name),
'companyName' => $license->companyName, 'companyName' => e($license->companyName),
'manufacturer' => ($license->manufacturer) ? $license->manufacturer : null, 'manufacturer' => ($license->manufacturer) ? $license->manufacturer : null,
'serial' => $license->name, 'serial' => e($license->name),
'purchase_order' => $license->order_number, 'purchase_order' => e($license->order_number),
'purchase_date' => $license->purchase_date, 'purchase_date' => e($license->purchase_date),
'purchase_cost' => $license->purchase_cost, 'purchase_cost' => e($license->purchase_cost),
'depreciation' => ($license->depreciation) ? $license->depreciation : null, 'depreciation' => ($license->depreciation) ? $license->depreciation : null,
'notes' => $license->notes, 'notes' => e($license->notes),
'expiration_date' => $license->expiration_date, 'expiration_date' => e($license->expiration_date),
'totalSeats' => $license->seats, 'totalSeats' => e($license->seats),
'remaining' => $license->remaincount(), 'remaining' => $license->remaincount(),
'license_name' => $license->license_name, 'license_name' => e($license->license_name),
'license_email' => $license->license_email, 'license_email' => e($license->license_email),
'maintained' => ($license->maintained == 1) ? true : false, 'maintained' => ($license->maintained == 1) ? true : false,
'supplier' => ($license->supplier) ? $license->supplier : null, 'supplier' => ($license->supplier) ? $license->supplier : null,
'created_at' => $license->created_at, 'created_at' => $license->created_at,
]; ];
return $array; return $array;