updated version 1.0.3

This commit is contained in:
sujitprasad
2015-12-09 16:20:35 +05:30
parent 94f4c49254
commit 561a4a2e49
54 changed files with 2500 additions and 185 deletions

View File

@@ -1,5 +1,9 @@
<?php namespace App\Http\Controllers;
use App\Model\helpdesk\Manage\Sla_plan;
use App\Model\helpdesk\Ticket\Tickets;
class HomeController extends Controller {
/*
|--------------------------------------------------------------------------
@@ -27,7 +31,7 @@ class HomeController extends Controller {
* @return Response
*/
public function index() {
ksjdckjdsnc
// ksjdckjdsnc
return view('themes/default1/admin/dashboard');
}
@@ -37,4 +41,39 @@ class HomeController extends Controller {
return $smtp->host;
}
Public function getdata(){
return \View::make('emails/notifications/agent');
}
public function getreport(){
return \View::make('test');
}
public function pushdata(){
$date2 = strtotime(Date('Y-m-d'));
$date3 = Date('Y-m-d');
$format = 'Y-m-d';
$date1 = strtotime(Date($format,strtotime('-1 month'. $date3)));
$return = "";
$last = "";
for ( $i = $date1; $i <= $date2; $i = $i + 86400 ) {
$thisDate = date( 'Y-m-d', $i );
$created = \DB::table('tickets')->select('created_at')->where('created_at','LIKE','%'.$thisDate.'%')->count();
$closed = \DB::table('tickets')->select('closed_at')->where('closed_at','LIKE','%'.$thisDate.'%')->count();
$reopened = \DB::table('tickets')->select('reopened_at')->where('reopened_at','LIKE','%'.$thisDate.'%')->count();
$value = ['date' => $thisDate, 'open' => $created, 'closed' => $closed, 'reopened' => $reopened];
$array = array_map('htmlentities',$value);
$json = html_entity_decode(json_encode($array));
$return .= $json.',';
}
$last = rtrim($return,',');
return '['.$last.']';
}
}