From 92ba889caec707f6b81be0e6a0b6070e16e39a5e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 29 May 2024 12:53:51 +0100 Subject: [PATCH] Updated/removed facades Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 1 - app/Http/Controllers/AssetModelsController.php | 4 +--- app/Http/Controllers/ReportsController.php | 1 - app/Http/Controllers/Users/UsersController.php | 5 +---- app/Http/Livewire/Importer.php | 2 +- app/Http/Requests/SettingsLdapRequest.php | 2 +- app/Models/Ldap.php | 2 +- 7 files changed, 5 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 49e7905d77..dc20588b75 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -31,7 +31,6 @@ use Illuminate\Support\Facades\DB; use Illuminate\Http\Request; use App\Http\Requests\ImageUploadRequest; use Illuminate\Support\Facades\Log; -use Input; use Paginator; use Slack; use Str; diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index d094010201..6dcc8a1ce4 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -11,12 +11,10 @@ use App\Models\CustomField; use App\Models\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\Validator; -use Redirect; use Illuminate\Http\Request; -use Storage; +use Illuminate\Support\Facades\Storage; use Symfony\Component\HttpFoundation\JsonResponse; use Illuminate\Support\Facades\Log; diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 8e957117aa..bcf4b794ea 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -19,7 +19,6 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\View; -use Input; use League\Csv\Reader; use Symfony\Component\HttpFoundation\StreamedResponse; use League\Csv\EscapeFormula; diff --git a/app/Http/Controllers/Users/UsersController.php b/app/Http/Controllers/Users/UsersController.php index 2876505dd5..cba2471a4e 100755 --- a/app/Http/Controllers/Users/UsersController.php +++ b/app/Http/Controllers/Users/UsersController.php @@ -4,7 +4,6 @@ namespace App\Http\Controllers\Users; use App\Helpers\Helper; use App\Http\Controllers\Controller; -use App\Http\Controllers\UserNotFoundException; use App\Http\Requests\ImageUploadRequest; use App\Http\Requests\SaveUserRequest; use App\Models\Actionlog; @@ -18,11 +17,9 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Http\Request; use Illuminate\Support\Facades\Password; -use Input; use Redirect; use Str; use Symfony\Component\HttpFoundation\StreamedResponse; -use View; use App\Notifications\CurrentInventory; /** @@ -152,7 +149,7 @@ class UsersController extends Controller $user->notify(new WelcomeNotification($data)); } - return redirect::route('users.index')->with('success', trans('admin/users/message.success.create')); + return redirect()->route('users.index')->with('success', trans('admin/users/message.success.create')); } return redirect()->back()->withInput()->withErrors($user->getErrors()); diff --git a/app/Http/Livewire/Importer.php b/app/Http/Livewire/Importer.php index 23283b583b..318514af73 100644 --- a/app/Http/Livewire/Importer.php +++ b/app/Http/Livewire/Importer.php @@ -6,7 +6,7 @@ use App\Models\CustomField; use Livewire\Component; use App\Models\Import; -use Storage; +use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Log; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; diff --git a/app/Http/Requests/SettingsLdapRequest.php b/app/Http/Requests/SettingsLdapRequest.php index 234903cba4..75eb15f230 100644 --- a/app/Http/Requests/SettingsLdapRequest.php +++ b/app/Http/Requests/SettingsLdapRequest.php @@ -2,7 +2,7 @@ namespace App\Http\Requests; -use Session; +use Illuminate\Support\Facades\Session; class SettingsLdapRequest extends Request { diff --git a/app/Models/Ldap.php b/app/Models/Ldap.php index 3f44389a76..dd3920b56a 100644 --- a/app/Models/Ldap.php +++ b/app/Models/Ldap.php @@ -6,8 +6,8 @@ use App\Models\Setting; use App\Models\User; use Exception; use Illuminate\Database\Eloquent\Model; -use Input; use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Crypt; /*********************************************** * TODOS: