update v1.0.5

This commit is contained in:
sujitprasad
2016-01-25 20:45:35 +05:30
parent 0b8ebb9c70
commit e7149e34e4
252 changed files with 9008 additions and 3152 deletions

View File

@@ -1,8 +1,10 @@
<?php namespace App\Http\Controllers\Client\helpdesk;
// controllers
use App\Http\Controllers\Controller;
use App\Http\Controllers\Agent\helpdesk\TicketController;
use App\Http\Controllers\Common\SettingsController;
// requests
use Illuminate\Http\Request;
use App\Http\Requests\helpdesk\CreateTicketRequest;
@@ -22,12 +24,14 @@ use App\Model\helpdesk\Ticket\Ticket_Status;
use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Agent\Department;
use App\User;
// classes
use Auth;
use Hash;
use Input;
use Mail;
use PDF;
use Exception;
/**
* TicketController2
@@ -67,18 +71,25 @@ class ClientTicketController extends Controller {
$comment = $request->input('comment');
if($comment != null) {
$tickets = Tickets::where('id','=',$id)->first();
$tickets->closed_at = null;
$tickets->closed = 0;
$tickets->reopened_at = date('Y-m-d H:i:s');
$tickets->reopened = 1;
$threads = new Ticket_Thread;
$threads->user_id = Auth::user()->id;
$threads->ticket_id = $tickets->id;
$threads->poster = "client";
$threads->body = $comment;
$threads->save();
return \Redirect::back()->with('success1','Successfully replied');
try {
$threads->save();
$tickets->save();
return \Redirect::back()->with('success1','Successfully replied');
} catch(Exception $e) {
return \Redirect::back()->with('fails1',$e->errorInfo[2]);
}
} else {
return \Redirect::back()->with('fails1','Please fill some data!');
}
}
}