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:
Shift
2023-01-07 18:48:11 +00:00
parent 67bf088f27
commit 723ac38edd
25 changed files with 98 additions and 91 deletions

View File

@@ -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) {