Adopt short array syntax
Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`.
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
$term = $_GET["term"];
|
||||
$users = app\User::where('email', 'LIKE', '%' . $term . '%')->where('active', '=', 1)->where('role', '=', 'user')->get();
|
||||
$json = array();
|
||||
$json = [];
|
||||
|
||||
foreach ($users as $user) {
|
||||
|
||||
$json[] = array(
|
||||
$json[] = [
|
||||
'value' => $user["email"],
|
||||
'label' => 'Name: '.$user["first_name"] .' '.$user["last_name"].' | '.('Email: <'.$user["email"].'>'),
|
||||
'email' => $user["email"],
|
||||
@@ -17,7 +17,7 @@ foreach ($users as $user) {
|
||||
'mobile' => $user["mobile"],
|
||||
'phone_number' => $user["phone_number"]
|
||||
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
echo json_encode($json);
|
||||
|
@@ -52,9 +52,9 @@ class="nav-link active"
|
||||
$date_time_format = UTC::getDateTimeFormat();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->count();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', [1, 7])->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->count();
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->orderBy('id', 'DESC')->count();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', [1, 7])->orderBy('id', 'DESC')->count();
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
|
@@ -149,7 +149,7 @@ if ($thread->title != "") {
|
||||
@endif
|
||||
|
||||
|
||||
<?php Event::fire('show-add-event-btn', array()); ?>
|
||||
<?php Event::fire('show-add-event-btn', []); ?>
|
||||
|
||||
<a href="{{url('ticket/print/'.$tickets->id)}}" target="_blank" class="btn btn-default btn-tool btn-sm"><i class="fas fa-print" > </i> {!! Lang::get('lang.generate_pdf') !!}</a>
|
||||
<div class="btn-group">
|
||||
@@ -311,7 +311,7 @@ if ($thread->title != "") {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php Event::fire('ticket.timeline.marble',array($TicketData));?>
|
||||
<?php Event::fire('ticket.timeline.marble',[$TicketData]);?>
|
||||
<div id="gifshow" style="display:none" class="text-center">
|
||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}">
|
||||
</div> <!-- added 05/05/2016-->
|
||||
@@ -1072,7 +1072,7 @@ if ($thread->title != "") {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<?php \Event::fire('show-add-calendar-model', array('id' => $tickets->id))?>
|
||||
<?php \Event::fire('show-add-calendar-model', ['id' => $tickets->id])?>
|
||||
<!-- add or search user Modal -->
|
||||
<div class="modal fade" id="addccc">
|
||||
<div class="modal-dialog">
|
||||
|
Reference in New Issue
Block a user