Adopt short array syntax

Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`.
This commit is contained in:
Shift
2023-01-03 08:25:32 +00:00
parent 43386fd86d
commit f9ab4d057e
17 changed files with 62 additions and 62 deletions

View File

@@ -2,18 +2,18 @@
$term = $_GET["term"];
$organizations =App\Model\helpdesk\Agent_panel\Organization::where('name', 'LIKE', '%' . $term . '%')->get();
$json = array();
$json = [];
foreach ($organizations as $organization) {
$json[] = array(
$json[] = [
'value' => $organization["name"],
'label' => $organization["name"],
'org' => $organization["name"],
);
];
}
echo json_encode($json);