Files
faveo/resources/views/themes/default1/agent/helpdesk/organization/getautocomplete.blade.php
2016-10-25 14:41:58 +05:30

19 lines
381 B
PHP

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