Adopt short array syntax
Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`.
This commit is contained in:
@@ -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);
|
Reference in New Issue
Block a user