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

@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Agent\helpdesk;
// controllers
use Illuminate\Support\Facades\Request as Input;
use App\Http\Controllers\Controller;
// requests
use App\Http\Requests\helpdesk\OrganizationRequest;
@@ -264,7 +265,7 @@ class OrganizationController extends Controller
public function Head_Org($id)
{
// get the user to make organization head
$head_user = \Input::get('user');
$head_user = Input::get('user');
// get an instance of the selected organization
$org_head = Organization::where('id', '=', $id)->first();
$org_head->head = $head_user;

View File

@@ -45,7 +45,7 @@ use Hash;
use Illuminate\Http\Request;
use Illuminate\support\Collection;
use Illuminate\Support\Str;
use Input;
use Illuminate\Support\Facades\Request as Input;
use Lang;
use Mail;
use PDF;
@@ -1588,7 +1588,7 @@ class TicketController extends Controller
*/
public function autosearch($id)
{
$term = \Input::get('term');
$term = Input::get('term');
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->pluck('email');
echo json_encode($user);
}

View File

@@ -39,7 +39,7 @@ use Exception;
use GeoIP;
use Hash;
use Illuminate\Http\Request;
use Input;
use Illuminate\Support\Facades\Request as Input;
use Lang;
use Redirect;
@@ -897,7 +897,7 @@ class UserController extends Controller
// checking if the name is unique
$check2 = Organization::where('name', '=', Input::get('name'))->first();
// if any of the fields is not available then return false
if (\Input::get('name') == null) {
if (Input::get('name') == null) {
return 'Name is required';
} elseif ($check2 != null) {
return 'Name should be Unique';