Convert Input to Request facade
Laravel 5.2 no longer registers the `Input` facade by default. While still available in Laravel 5, the `Input` facade is removed in Laravel 6.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Api\v1;
|
||||
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController as CoreTicketController;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\helpdesk\TicketRequest;
|
||||
@@ -1418,7 +1419,7 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$v = \Validator::make(
|
||||
\Input::get(),
|
||||
Input::all(),
|
||||
[
|
||||
'email' => 'required|email|unique:users',
|
||||
'ticket_id' => 'required',
|
||||
@@ -1451,7 +1452,7 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$v = \Validator::make(
|
||||
\Input::get(),
|
||||
Input::all(),
|
||||
[
|
||||
'ticket_id' => 'required',
|
||||
]
|
||||
@@ -1483,7 +1484,7 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$v = \Validator::make(
|
||||
\Input::get(),
|
||||
Input::all(),
|
||||
[
|
||||
'ticketid' => 'required',
|
||||
'email' => 'required',
|
||||
|
||||
@@ -15,7 +15,7 @@ use App\Model\helpdesk\Ticket\Tickets;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Hash;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Mail;
|
||||
|
||||
/**
|
||||
@@ -407,15 +407,15 @@ class TicketController extends Controller
|
||||
try {
|
||||
$ticket = $ticket->where('id', '=', $ticket_id)->first();
|
||||
|
||||
$ticket->sla = Input::get('sla_plan');
|
||||
$ticket->help_topic_id = Input::get('help_topic');
|
||||
$ticket->source = Input::get('ticket_source');
|
||||
$ticket->priority_id = Input::get('ticket_priority');
|
||||
$ticket->status = Input::get('status');
|
||||
$ticket->sla = Request::get('sla_plan');
|
||||
$ticket->help_topic_id = Request::get('help_topic');
|
||||
$ticket->source = Request::get('ticket_source');
|
||||
$ticket->priority_id = Request::get('ticket_priority');
|
||||
$ticket->status = Request::get('status');
|
||||
$ticket->save();
|
||||
|
||||
$threads = $thread->where('ticket_id', '=', $ticket_id)->first();
|
||||
$threads->title = Input::get('subject');
|
||||
$threads->title = Request::get('subject');
|
||||
$threads->save();
|
||||
} catch (\Exception $ex) {
|
||||
$result = $ex->getMessage();
|
||||
@@ -436,7 +436,7 @@ class TicketController extends Controller
|
||||
public function assign($id)
|
||||
{
|
||||
try {
|
||||
$UserEmail = Input::get('user');
|
||||
$UserEmail = Request::get('user');
|
||||
//dd($UserEmail);
|
||||
// $UserEmail = 'sujitprasad12@yahoo.in';
|
||||
$user = User::where('email', '=', $UserEmail)->first();
|
||||
@@ -613,7 +613,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function autosearch()
|
||||
{
|
||||
$term = \Input::get('term');
|
||||
$term = Request::get('term');
|
||||
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->orWhere('first_name', 'LIKE', '%'.$term.'%')->orWhere('last_name', 'LIKE', '%'.$term.'%')->orWhere('user_name', 'LIKE', '%'.$term.'%')->pluck('email');
|
||||
|
||||
return $user;
|
||||
@@ -627,8 +627,8 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function useradd()
|
||||
{
|
||||
$email = Input::get('email');
|
||||
$ticket_id = Input::get('ticket_id');
|
||||
$email = Request::get('email');
|
||||
$ticket_id = Request::get('ticket_id');
|
||||
$company = $this->company();
|
||||
$user = new User();
|
||||
$user->user_name = $email;
|
||||
@@ -661,8 +661,8 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function userremove()
|
||||
{
|
||||
$email = Input::get('email');
|
||||
$ticketid = Input::get('ticketid');
|
||||
$email = Request::get('email');
|
||||
$ticketid = Request::get('ticketid');
|
||||
$user = new User();
|
||||
$user = $user->where('email', $email)->first();
|
||||
$ticket_collaborator = Ticket_Collaborator::where('ticket_id', '=', $ticketid)
|
||||
@@ -680,7 +680,7 @@ class TicketController extends Controller
|
||||
public function getCollaboratorForTicket()
|
||||
{
|
||||
try {
|
||||
$ticketid = Input::get('ticket_id');
|
||||
$ticketid = Request::get('ticket_id');
|
||||
|
||||
$ticket_collaborator = \DB::table('users')
|
||||
->join('ticket_collaborator', function ($join) use ($ticketid) {
|
||||
|
||||
Reference in New Issue
Block a user