Minor code cleanup bits and bobs (#6805)

* Add IDE Helper files

* Cleanup imports

- Alphabetises imports
- Removes unused imports

* Add Platform requirements

* Move filling asset into block where asset exists

* Remove duplicate array keys
This commit is contained in:
Martin Meredith 2019-03-14 03:12:03 +00:00 committed by snipe
parent 55f727ef28
commit e3e0d57f56
225 changed files with 991 additions and 764 deletions

2
.gitignore vendored
View file

@ -57,3 +57,5 @@ tests/_support/_generated/*
phpmd\.xml phpmd\.xml
/public/storage /public/storage
_ide_helper.php
.phpstorm.meta.php

View file

@ -2,8 +2,8 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Setting; use App\Models\Setting;
use Illuminate\Console\Command;
class DisableLDAP extends Command class DisableLDAP extends Command
{ {

View file

@ -4,12 +4,12 @@ declare(strict_types=1);
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Services\LdapAd;
use Illuminate\Support\Facades\Log;
use Exception;
use App\Models\Location;
use Illuminate\Console\Command;
use Adldap\Models\User as AdldapUser; use Adldap\Models\User as AdldapUser;
use App\Models\Location;
use App\Services\LdapAd;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
/** /**
* LDAP / AD sync command. * LDAP / AD sync command.

View file

@ -1,31 +1,9 @@
<?php <?php
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Helpers\Helper;
use App\Importer\AccessoryImporter;
use App\Importer\AssetImporter;
use App\Importer\ConsumableImporter;
use App\Importer\Importer;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Category;
use App\Models\Company;
use App\Models\Consumable;
use App\Models\CustomField;
use App\Models\Location;
use App\Models\Manufacturer;
use App\Models\Setting;
use App\Models\Statuslabel;
use App\Models\Supplier;
use App\Models\User;
use DB;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Model;
use League\Csv\Reader;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
use ForceUTF8\Encoding;
ini_set('max_execution_time', 600); //600 seconds = 10 minutes ini_set('max_execution_time', 600); //600 seconds = 10 minutes
ini_set('memory_limit', '500M'); ini_set('memory_limit', '500M');

View file

@ -2,22 +2,19 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Category;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\License;
use App\Models\Location;
use App\Models\Manufacturer;
use App\Models\Statuslabel;
use App\Models\Supplier;
use App\Models\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use DB;
use \App\Models\Asset;
use \App\Models\AssetModel;
use \App\Models\Location;
use \App\Models\Company;
use \App\Models\License;
use \App\Models\Accessory;
use \App\Models\Component;
use \App\Models\Consumable;
use \App\Models\Category;
use \App\Models\User;
use \App\Models\Supplier;
use \App\Models\Manufacturer;
use \App\Models\Depreciation;
use \App\Models\Statuslabel;
class Purge extends Command class Purge extends Command
{ {

View file

@ -2,11 +2,11 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Models\CustomField;
use Illuminate\Console\Command;
use App\LegacyEncrypter\McryptEncrypter; use App\LegacyEncrypter\McryptEncrypter;
use App\Models\Setting;
use App\Models\Asset; use App\Models\Asset;
use App\Models\CustomField;
use App\Models\Setting;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class RecryptFromMcrypt extends Command class RecryptFromMcrypt extends Command

View file

@ -2,11 +2,10 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Setting; use App\Models\Setting;
use DB;
use Artisan; use Artisan;
use Illuminate\Console\Command;
class RegenerateAssetTags extends Command class RegenerateAssetTags extends Command
{ {

View file

@ -3,9 +3,9 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Setting; use App\Models\Setting;
use App\Models\User; use App\Models\User;
use Illuminate\Console\Command;
class ResetDemoSettings extends Command class ResetDemoSettings extends Command
{ {

View file

@ -2,16 +2,13 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
use App\Models\Actionlog; use App\Models\Actionlog;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Consumable;
use App\Models\Accessory;
use App\Models\LicenseSeat;
use App\Models\License; use App\Models\License;
use DB; use App\Models\User;
use Artisan; use Artisan;
use DB;
use Illuminate\Console\Command;
class RestoreDeletedUsers extends Command class RestoreDeletedUsers extends Command
{ {

View file

@ -2,10 +2,9 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Asset;
use App\Models\User; use App\Models\User;
use App\Notifications\CurrentInventory; use App\Notifications\CurrentInventory;
use Illuminate\Console\Command;
class SendCurrentInventoryToUsers extends Command class SendCurrentInventoryToUsers extends Command
{ {

View file

@ -2,8 +2,8 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Asset; use App\Models\Asset;
use Illuminate\Console\Command;
class SyncAssetCounters extends Command class SyncAssetCounters extends Command
{ {

View file

@ -2,10 +2,8 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Models\CustomField;
use Illuminate\Console\Command;
use App\Models\Asset; use App\Models\Asset;
use Illuminate\Support\Facades\Storage; use Illuminate\Console\Command;
class SyncAssetLocations extends Command class SyncAssetLocations extends Command
{ {

View file

@ -2,12 +2,8 @@
namespace App\Events; namespace App\Events;
use App\Models\Accessory;
use App\Models\Actionlog;
use App\Models\CheckoutAcceptance; use App\Models\CheckoutAcceptance;
use App\Models\Contracts\Acceptable; use App\Models\Contracts\Acceptable;
use App\Models\User;
use Illuminate\Broadcasting\Channel;
use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View file

@ -2,12 +2,8 @@
namespace App\Events; namespace App\Events;
use App\Models\Accessory;
use App\Models\Actionlog;
use App\Models\CheckoutAcceptance; use App\Models\CheckoutAcceptance;
use App\Models\Contracts\Acceptable; use App\Models\Contracts\Acceptable;
use App\Models\User;
use Illuminate\Broadcasting\Channel;
use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View file

@ -3,6 +3,7 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Exception;
class CheckoutNotAllowed extends Exception class CheckoutNotAllowed extends Exception
{ {

View file

@ -2,11 +2,10 @@
namespace App\Exceptions; namespace App\Exceptions;
use App\Helpers\Helper;
use Exception; use Exception;
use Illuminate\Auth\AuthenticationException; use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use App\Helpers\Helper;
use Illuminate\Validation\ValidationException;
use Log; use Log;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler

View file

@ -1,24 +1,14 @@
<?php <?php
namespace App\Helpers; namespace App\Helpers;
use DB;
use App\Models\Statuslabel;
use App\Models\Location;
use App\Models\Department;
use App\Models\AssetModel;
use App\Models\Company;
use App\Models\User;
use App\Models\Manufacturer;
use App\Models\Supplier;
use App\Models\Category;
use App\Models\Depreciation;
use App\Models\CustomFieldset;
use App\Models\CustomField;
use App\Models\Component;
use App\Models\Accessory; use App\Models\Accessory;
use App\Models\Component;
use App\Models\Consumable; use App\Models\Consumable;
use App\Models\Asset; use App\Models\CustomField;
use App\Models\CustomFieldset;
use App\Models\Depreciation;
use App\Models\Setting; use App\Models\Setting;
use App\Models\Statuslabel;
use Crypt; use Crypt;
use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Contracts\Encryption\DecryptException;

View file

@ -7,9 +7,8 @@ use App\Http\Requests\ImageUploadRequest;
use App\Models\Accessory; use App\Models\Accessory;
use App\Models\Company; use App\Models\Company;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Redirect;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Redirect;
/** This controller handles all actions related to Accessories for /** This controller handles all actions related to Accessories for
* the Snipe-IT Asset Management application. * the Snipe-IT Asset Management application.

View file

@ -9,7 +9,6 @@ use App\Models\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
class AccessoryCheckinController extends Controller class AccessoryCheckinController extends Controller
{ {

View file

@ -6,16 +6,13 @@ use App\Events\CheckoutDeclined;
use App\Events\ItemAccepted; use App\Events\ItemAccepted;
use App\Events\ItemDeclined; use App\Events\ItemDeclined;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Asset;
use App\Models\CheckoutAcceptance; use App\Models\CheckoutAcceptance;
use App\Models\Company; use App\Models\Company;
use App\Models\Consumable;
use App\Models\Contracts\Acceptable; use App\Models\Contracts\Acceptable;
use App\Models\License;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class AcceptanceController extends Controller { class AcceptanceController extends Controller {

View file

@ -2,14 +2,13 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Accessory; use App\Http\Controllers\Controller;
use App\Http\Transformers\AccessoriesTransformer; use App\Http\Transformers\AccessoriesTransformer;
use App\Models\Company;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Accessory;
use App\Models\Company;
use Illuminate\Http\Request;
class AccessoriesController extends Controller class AccessoriesController extends Controller
{ {

View file

@ -9,7 +9,6 @@ use App\Models\AssetMaintenance;
use App\Models\Company; use App\Models\Company;
use Auth; use Auth;
use Carbon\Carbon; use Carbon\Carbon;
use Gate;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;

View file

@ -1,17 +1,16 @@
<?php <?php
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Models\AssetModel;
use App\Models\Asset;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use Illuminate\Http\Request; use App\Http\Controllers\Controller;
use App\Http\Transformers\AssetModelsTransformer; use App\Http\Transformers\AssetModelsTransformer;
use App\Http\Transformers\AssetsTransformer; use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Asset;
use App\Models\AssetModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
/** /**
* This class controls all actions related to asset models for * This class controls all actions related to asset models for
* the Snipe-IT Asset Management application. * the Snipe-IT Asset Management application.

View file

@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\AssetCheckoutRequest; use App\Http\Requests\AssetCheckoutRequest;
use App\Http\Transformers\AssetsTransformer; use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\LicensesTransformer; use App\Http\Transformers\LicensesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\Asset; use App\Models\Asset;
use App\Models\AssetModel; use App\Models\AssetModel;
use App\Models\Company; use App\Models\Company;
@ -14,26 +15,16 @@ use App\Models\License;
use App\Models\Location; use App\Models\Location;
use App\Models\Setting; use App\Models\Setting;
use App\Models\User; use App\Models\User;
use Artisan;
use Auth; use Auth;
use Carbon\Carbon; use Carbon\Carbon;
use Config;
use DB; use DB;
use Gate;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Input; use Input;
use Lang;
use Log;
use Mail;
use Paginator; use Paginator;
use Response;
use Slack; use Slack;
use Str; use Str;
use TCPDF; use TCPDF;
use Validator; use Validator;
use View;
use App\Http\Transformers\SelectlistTransformer;
/** /**
* This class controls all actions related to assets for * This class controls all actions related to assets for
@ -476,10 +467,9 @@ class AssetsController extends Controller
{ {
$this->authorize('update', Asset::class); $this->authorize('update', Asset::class);
$asset->fill($request->all());
if ($asset = Asset::find($id)) { if ($asset = Asset::find($id)) {
$asset->fill($request->all());
($request->filled('model_id')) ? ($request->filled('model_id')) ?
$asset->model()->associate(AssetModel::find($request->get('model_id'))) : null; $asset->model()->associate(AssetModel::find($request->get('model_id'))) : null;
($request->filled('rtd_location_id')) ? ($request->filled('rtd_location_id')) ?

View file

@ -2,12 +2,12 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Category; use App\Http\Controllers\Controller;
use App\Http\Transformers\CategoriesTransformer; use App\Http\Transformers\CategoriesTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Category;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class CategoriesController extends Controller class CategoriesController extends Controller

View file

@ -2,12 +2,12 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Http\Transformers\CompaniesTransformer;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Company; use App\Http\Controllers\Controller;
use App\Http\Transformers\CompaniesTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Company;
use Illuminate\Http\Request;
class CompaniesController extends Controller class CompaniesController extends Controller
{ {

View file

@ -2,14 +2,12 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\ComponentsTransformer;
use App\Http\Transformers\ComponentsAssetsTransformer;
use App\Models\Component;
use App\Models\Company;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Transformers\ComponentsTransformer;
use App\Models\Company;
use App\Models\Component;
use Illuminate\Http\Request;
class ComponentsController extends Controller class ComponentsController extends Controller
{ {

View file

@ -2,13 +2,13 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request; use App\Helpers\Helper;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Transformers\ConsumablesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\Company; use App\Models\Company;
use App\Models\Consumable; use App\Models\Consumable;
use App\Http\Transformers\ConsumablesTransformer; use Illuminate\Http\Request;
use App\Helpers\Helper;
use App\Http\Transformers\SelectlistTransformer;
class ConsumablesController extends Controller class ConsumablesController extends Controller
{ {

View file

@ -9,7 +9,6 @@ use App\Models\CustomField;
use App\Models\CustomFieldset; use App\Models\CustomFieldset;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Validator; use Validator;
use Illuminate\Validation\Rule;
class CustomFieldsController extends Controller class CustomFieldsController extends Controller
{ {

View file

@ -1,21 +1,14 @@
<?php <?php
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use View;
use App\Models\CustomFieldset;
use App\Models\CustomField;
use Input;
use Validator;
use Redirect;
use App\Models\AssetModel;
use Lang;
use Auth;
use Illuminate\Http\Request;
use Log;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Http\Transformers\CustomFieldsTransformer; use App\Http\Controllers\Controller;
use App\Http\Transformers\CustomFieldsetsTransformer; use App\Http\Transformers\CustomFieldsetsTransformer;
use App\Http\Transformers\CustomFieldsTransformer;
use App\Models\CustomFieldset;
use Illuminate\Http\Request;
use Redirect;
use View;
/** /**
* This controller handles all actions related to Custom Asset Fieldsets for * This controller handles all actions related to Custom Asset Fieldsets for

View file

@ -2,13 +2,13 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Department;
use App\Http\Transformers\DepartmentsTransformer;
use App\Helpers\Helper; use App\Helpers\Helper;
use Auth; use App\Http\Controllers\Controller;
use App\Http\Transformers\DepartmentsTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Department;
use Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class DepartmentsController extends Controller class DepartmentsController extends Controller

View file

@ -2,11 +2,11 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Depreciation; use App\Http\Controllers\Controller;
use App\Http\Transformers\DepreciationsTransformer; use App\Http\Transformers\DepreciationsTransformer;
use App\Models\Depreciation;
use Illuminate\Http\Request;
class DepreciationsController extends Controller class DepreciationsController extends Controller
{ {

View file

@ -2,11 +2,11 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Group; use App\Http\Controllers\Controller;
use App\Http\Transformers\GroupsTransformer; use App\Http\Transformers\GroupsTransformer;
use App\Models\Group;
use Illuminate\Http\Request;
class GroupsController extends Controller class GroupsController extends Controller
{ {

View file

@ -6,16 +6,15 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Requests\ItemImportRequest; use App\Http\Requests\ItemImportRequest;
use App\Http\Transformers\ImportsTransformer; use App\Http\Transformers\ImportsTransformer;
use App\Models\Asset;
use App\Models\Company; use App\Models\Company;
use App\Models\Import; use App\Models\Import;
use Illuminate\Http\Request; use Artisan;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use League\Csv\Reader; use League\Csv\Reader;
use Symfony\Component\HttpFoundation\File\Exception\FileException; use Symfony\Component\HttpFoundation\File\Exception\FileException;
use Artisan;
use App\Models\Asset;
use Illuminate\Support\Facades\Storage;
class ImportController extends Controller class ImportController extends Controller
{ {

View file

@ -6,12 +6,12 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Transformers\LicenseSeatsTransformer; use App\Http\Transformers\LicenseSeatsTransformer;
use App\Http\Transformers\LicensesTransformer; use App\Http\Transformers\LicensesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\Company; use App\Models\Company;
use App\Models\License; use App\Models\License;
use App\Models\LicenseSeat; use App\Models\LicenseSeat;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use App\Http\Transformers\SelectlistTransformer;
class LicensesController extends Controller class LicensesController extends Controller
{ {

View file

@ -2,12 +2,12 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Location; use App\Http\Controllers\Controller;
use App\Http\Transformers\LocationsTransformer; use App\Http\Transformers\LocationsTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Location;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class LocationsController extends Controller class LocationsController extends Controller

View file

@ -2,13 +2,12 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Manufacturer; use App\Http\Controllers\Controller;
use App\Http\Transformers\DatatablesTransformer;
use App\Http\Transformers\ManufacturersTransformer; use App\Http\Transformers\ManufacturersTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Models\Manufacturer;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class ManufacturersController extends Controller class ManufacturersController extends Controller

View file

@ -2,11 +2,11 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\PredefinedKit; use App\Http\Controllers\Controller;
use App\Http\Transformers\PredefinedKitsTransformer; use App\Http\Transformers\PredefinedKitsTransformer;
use App\Models\PredefinedKit;
use Illuminate\Http\Request;
/** /**
* @author [D. Minaev.] [<dmitriy.minaev.v@gmail.com>] * @author [D. Minaev.] [<dmitriy.minaev.v@gmail.com>]

View file

@ -2,11 +2,10 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Models\CheckoutRequest;
use App\Http\Controllers\Controller;
use Auth;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\CheckoutRequest;
use Auth;
class ProfileController extends Controller class ProfileController extends Controller
{ {

View file

@ -2,10 +2,10 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Actionlog;
use App\Http\Transformers\ActionlogsTransformer; use App\Http\Transformers\ActionlogsTransformer;
use App\Models\Actionlog;
use Illuminate\Http\Request;
class ReportsController extends Controller class ReportsController extends Controller
{ {

View file

@ -2,17 +2,17 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Services\LdapAd;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Notification;
use App\Models\Setting;
use Illuminate\Http\Request;
use App\Notifications\MailTest;
use App\Notifications\SlackTest;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Transformers\LoginAttemptsTransformer; use App\Http\Transformers\LoginAttemptsTransformer;
use App\Models\Setting;
use App\Notifications\MailTest;
use App\Notifications\SlackTest;
use App\Services\LdapAd;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification;
class SettingsController extends Controller class SettingsController extends Controller
{ {

View file

@ -2,13 +2,13 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Statuslabel; use App\Http\Controllers\Controller;
use App\Models\Asset;
use App\Http\Transformers\StatuslabelsTransformer;
use App\Http\Transformers\AssetsTransformer; use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\StatuslabelsTransformer;
use App\Models\Asset;
use App\Models\Statuslabel;
use Illuminate\Http\Request;
class StatuslabelsController extends Controller class StatuslabelsController extends Controller
{ {

View file

@ -2,15 +2,14 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Supplier; use App\Http\Controllers\Controller;
use App\Http\Transformers\SuppliersTransformer;
use App\Http\Transformers\SelectlistTransformer; use App\Http\Transformers\SelectlistTransformer;
use App\Http\Transformers\SuppliersTransformer;
use App\Models\Supplier;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class SuppliersController extends Controller class SuppliersController extends Controller
{ {
/** /**

View file

@ -2,19 +2,19 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Http\Transformers\LicensesTransformer;
use App\Models\License;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Transformers\UsersTransformer;
use App\Models\Company;
use App\Models\User;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\SaveUserRequest; use App\Http\Requests\SaveUserRequest;
use App\Models\Asset;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Http\Transformers\AccessoriesTransformer; use App\Http\Transformers\AccessoriesTransformer;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\LicensesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Http\Transformers\UsersTransformer;
use App\Models\Asset;
use App\Models\Company;
use App\Models\License;
use App\Models\User;
use Illuminate\Http\Request;
class UsersController extends Controller class UsersController extends Controller
{ {

View file

@ -1,26 +1,17 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Helpers\Helper;
use App\Models\Asset;
use App\Models\AssetMaintenance; use App\Models\AssetMaintenance;
use Carbon\Carbon;
use App\Models\Company; use App\Models\Company;
use DB; use Auth;
use Input; use Carbon\Carbon;
use Lang; use Illuminate\Http\Request;
use Log;
use Mail;
use Response;
use Slack; use Slack;
use Str; use Str;
use TCPDF; use TCPDF;
use Validator;
use View; use View;
use App\Models\Setting;
use App\Models\Asset;
use App\Helpers\Helper;
use Auth;
use Gate;
use Illuminate\Http\Request;
/** /**
* This controller handles all actions related to Asset Maintenance for * This controller handles all actions related to Asset Maintenance for

View file

@ -1,14 +1,13 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Helpers\Helper;
use App\Http\Requests\ImageUploadRequest;
use App\Models\AssetModel;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\View;
use App\Models\AssetModel;
use Redirect; use Redirect;
use App\Helpers\Helper;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
/** /**
* This class controls all actions related to asset models for * This class controls all actions related to asset models for

View file

@ -8,10 +8,7 @@ use App\Http\Controllers\CheckInOutRequest;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Requests\AssetCheckoutRequest; use App\Http\Requests\AssetCheckoutRequest;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Location;
use App\Models\User;
use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
class AssetCheckoutController extends Controller class AssetCheckoutController extends Controller

View file

@ -7,35 +7,28 @@ use App\Http\Requests\ImageUploadRequest;
use App\Models\Actionlog; use App\Models\Actionlog;
use App\Models\Asset; use App\Models\Asset;
use App\Models\AssetModel; use App\Models\AssetModel;
use App\Models\CheckoutRequest;
use App\Models\Company; use App\Models\Company;
use App\Models\Location; use App\Models\Location;
use App\Models\Setting; use App\Models\Setting;
use App\Models\User; use App\Models\User;
use Artisan;
use Auth; use Auth;
use Carbon\Carbon; use Carbon\Carbon;
use Config;
use DB; use DB;
use Gate; use Gate;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Image; use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Storage;
use Input; use Input;
use Lang;
use League\Csv\Reader; use League\Csv\Reader;
use League\Csv\Statement; use League\Csv\Statement;
use Illuminate\Support\Facades\Cache;
use Log;
use Mail;
use Paginator; use Paginator;
use Redirect; use Redirect;
use Response; use Response;
use Slack; use Slack;
use Str; use Str;
use TCPDF; use TCPDF;
use Validator;
use View; use View;
use App\Models\CheckoutRequest;
use Illuminate\Support\Facades\Storage;
/** /**
* This class controls all actions related to assets for * This class controls all actions related to assets for

View file

@ -7,7 +7,6 @@ use App\Http\Controllers\CheckInOutRequest;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Setting; use App\Models\Setting;
use App\Models\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;

View file

@ -5,7 +5,6 @@ namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails; use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\User;
class ForgotPasswordController extends Controller class ForgotPasswordController extends Controller
{ {

View file

@ -2,19 +2,19 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
use App\Services\LdapAd;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use App\Models\Setting; use App\Models\Setting;
use App\Models\User; use App\Models\User;
use Illuminate\Support\Facades\Auth; use App\Services\LdapAd;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Redirect;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator;
use Redirect;
/** /**
* This controller handles authentication for the user, including local * This controller handles authentication for the user, including local

View file

@ -3,7 +3,6 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class RegisterController extends Controller class RegisterController extends Controller
{ {

View file

@ -6,7 +6,6 @@ use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class ResetPasswordController extends Controller class ResetPasswordController extends Controller
{ {
/* /*

View file

@ -2,22 +2,11 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Category as Category;
use App\Models\Company;
use App\Models\CustomField;
use App\Models\Setting;
use Auth;
use DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use Input;
use Lang;
use Redirect;
use Str;
use View;
use Image;
use App\Http\Requests\ImageUploadRequest; use App\Http\Requests\ImageUploadRequest;
use App\Models\Category as Category;
use Auth;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Str;
/** /**
* This class controls all actions related to Categories for * This class controls all actions related to Categories for

View file

@ -1,7 +1,6 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Exceptions\CheckoutNotAllowed;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Location; use App\Models\Location;
use App\Models\SnipeModel; use App\Models\SnipeModel;

View file

@ -1,10 +1,9 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Company; use App\Models\Company;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Image;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
/** /**

View file

@ -5,7 +5,6 @@ namespace App\Http\Controllers\Components;
use App\Events\CheckoutableCheckedIn; use App\Events\CheckoutableCheckedIn;
use App\Events\ComponentCheckedIn; use App\Events\ComponentCheckedIn;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Actionlog;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Component; use App\Models\Component;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View file

@ -7,7 +7,6 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest; use App\Http\Requests\ImageUploadRequest;
use App\Models\Company; use App\Models\Company;
use App\Models\Consumable; use App\Models\Consumable;
use App\Models\User;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;

View file

@ -22,10 +22,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Auth; use Auth;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
abstract class Controller extends BaseController abstract class Controller extends BaseController
{ {

View file

@ -1,14 +1,12 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Redirect;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Http\Requests\CustomFieldRequest;
use App\Models\CustomField; use App\Models\CustomField;
use App\Models\CustomFieldset; use App\Models\CustomFieldset;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Redirect;
use App\Http\Requests\CustomFieldRequest;
/** /**
* This controller handles all actions related to Custom Asset Fields for * This controller handles all actions related to Custom Asset Fields for

View file

@ -1,14 +1,14 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\CustomFieldset; use App\Models\AssetModel;
use App\Models\CustomField; use App\Models\CustomField;
use App\Models\CustomFieldset;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
use Redirect; use Redirect;
use App\Models\AssetModel;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
/** /**
* This controller handles all actions related to Custom Asset Fields for * This controller handles all actions related to Custom Asset Fields for

View file

@ -2,12 +2,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Controllers\AdminController; use App\Http\Controllers\AdminController;
use App\Models\Actionlog;
use View;
use Auth; use Auth;
use Redirect; use View;
use App\Models\Asset;
use App\Models\Company;
/** /**
* This controller handles all actions related to the Admin Dashboard * This controller handles all actions related to the Admin Dashboard

View file

@ -2,11 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Department;
use Illuminate\Support\Facades\Auth;
use Image;
use App\Http\Requests\ImageUploadRequest; use App\Http\Requests\ImageUploadRequest;
use App\Models\Department;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class DepartmentsController extends Controller class DepartmentsController extends Controller

View file

@ -2,8 +2,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Depreciation; use App\Models\Depreciation;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
/** /**
* This controller handles all actions related to Depreciations for * This controller handles all actions related to Depreciations for

View file

@ -1,9 +1,9 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Support\Facades\Input;
use App\Models\Group;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Group;
use Illuminate\Support\Facades\Input;
/** /**
* This controller handles all actions related to User Groups for * This controller handles all actions related to User Groups for

View file

@ -3,9 +3,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Transformers\ImportsTransformer; use App\Http\Transformers\ImportsTransformer;
use App\Models\Import;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Import;
class ImportsController extends Controller class ImportsController extends Controller
{ {

View file

@ -1,22 +1,14 @@
<?php <?php
namespace App\Http\Controllers\Kits; namespace App\Http\Controllers\Kits;
use App\Models\PredefinedKit;
use App\Models\AssetModel;
use App\Models\PredefinedModel;
use App\Models\License;
use App\Models\PredefinedLicence;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Accessory;
use Illuminate\Http\Request;
use App\Http\Controllers\CheckInOutRequest; use App\Http\Controllers\CheckInOutRequest;
use App\Services\PredefinedKitCheckoutService; use App\Http\Controllers\Controller;
use App\Models\PredefinedKit;
use App\Models\PredefinedLicence;
use App\Models\PredefinedModel;
use App\Models\User; use App\Models\User;
use App\Services\PredefinedKitCheckoutService;
use Illuminate\Http\Request;
/** /**
* This controller handles all access kits management: * This controller handles all access kits management:

View file

@ -1,18 +1,13 @@
<?php <?php
namespace App\Http\Controllers\Kits; namespace App\Http\Controllers\Kits;
use App\Models\PredefinedKit;
use App\Models\AssetModel;
use App\Models\PredefinedModel;
use App\Models\License;
use App\Models\PredefinedLicence;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest; use App\Http\Requests\ImageUploadRequest;
use App\Models\Accessory; use App\Models\PredefinedKit;
use App\Models\PredefinedLicence;
use App\Models\PredefinedModel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
/** /**
* This controller handles all access kits management: * This controller handles all access kits management:
* list, add/remove/change * list, add/remove/change

View file

@ -3,12 +3,11 @@
namespace App\Http\Controllers\Licenses; namespace App\Http\Controllers\Licenses;
use App\Events\CheckoutableCheckedIn; use App\Events\CheckoutableCheckedIn;
use App\Models\Asset; use App\Http\Controllers\Controller;
use App\Models\License; use App\Models\License;
use App\Models\LicenseSeat; use App\Models\LicenseSeat;
use App\Models\User; use App\Models\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;

View file

@ -3,16 +3,13 @@
namespace App\Http\Controllers\Licenses; namespace App\Http\Controllers\Licenses;
use App\Events\CheckoutableCheckedOut; use App\Events\CheckoutableCheckedOut;
use App\Http\Controllers\Controller;
use App\Http\Requests\LicenseCheckoutRequest; use App\Http\Requests\LicenseCheckoutRequest;
use App\Models\Asset; use App\Models\Asset;
use App\Models\License; use App\Models\License;
use App\Models\LicenseSeat; use App\Models\LicenseSeat;
use App\Models\User; use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
class LicenseCheckoutController extends Controller class LicenseCheckoutController extends Controller
{ {

View file

@ -2,14 +2,14 @@
namespace App\Http\Controllers\Licenses; namespace App\Http\Controllers\Licenses;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest; use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog; use App\Models\Actionlog;
use App\Models\License; use App\Models\License;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\JsonResponse;
class LicenseFilesController extends Controller class LicenseFilesController extends Controller
{ {

View file

@ -1,13 +1,13 @@
<?php <?php
namespace App\Http\Controllers\Licenses; namespace App\Http\Controllers\Licenses;
use App\Http\Controllers\Controller;
use App\Models\License;
use Illuminate\Support\Facades\DB;
use App\Models\Company;
use App\Helpers\Helper; use App\Helpers\Helper;
use Illuminate\Support\Facades\Auth; use App\Http\Controllers\Controller;
use App\Models\Company;
use App\Models\License;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
/** /**
* This controller handles all actions related to Licenses for * This controller handles all actions related to Licenses for

View file

@ -2,10 +2,9 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Location; use App\Models\Location;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Image;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
/** /**

View file

@ -3,11 +3,10 @@ namespace App\Http\Controllers;
use App\Http\Requests\ImageUploadRequest; use App\Http\Requests\ImageUploadRequest;
use App\Models\Manufacturer; use App\Models\Manufacturer;
use Illuminate\Support\Facades\Auth;
use Redirect;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Image; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Redirect;
/** /**
* This controller handles all actions related to Manufacturers for * This controller handles all actions related to Manufacturers for

View file

@ -2,8 +2,6 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Helpers\Helper; use App\Helpers\Helper;
class ModalController extends Controller class ModalController extends Controller

View file

@ -1,18 +1,16 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Image; use App\Http\Requests\ImageUploadRequest;
use Input;
use Redirect;
use View;
use Auth;
use App\Helpers\Helper;
use App\Models\Setting; use App\Models\Setting;
use Auth;
use Gate; use Gate;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Image;
use Redirect;
use View;
/** /**
* This controller handles all actions related to User Profiles for * This controller handles all actions related to User Profiles for

View file

@ -6,18 +6,18 @@ use App\Models\Accessory;
use App\Models\Actionlog; use App\Models\Actionlog;
use App\Models\Asset; use App\Models\Asset;
use App\Models\AssetMaintenance; use App\Models\AssetMaintenance;
use App\Models\CustomField;
use App\Models\CheckoutAcceptance; use App\Models\CheckoutAcceptance;
use App\Models\CustomField;
use App\Models\Depreciation; use App\Models\Depreciation;
use App\Models\License; use App\Models\License;
use App\Models\Setting; use App\Models\Setting;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\View;
use Input; use Input;
use League\Csv\Reader; use League\Csv\Reader;
use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\StreamedResponse;
use Illuminate\Http\Request;
/** /**
* This controller handles all actions related to Reports for * This controller handles all actions related to Reports for

View file

@ -11,7 +11,6 @@ use App\Notifications\FirstAdminNotification;
use App\Notifications\MailTest; use App\Notifications\MailTest;
use Artisan; use Artisan;
use Auth; use Auth;
use Config;
use Crypt; use Crypt;
use DB; use DB;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View file

@ -1,11 +1,11 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Support\Facades\Input;
use App\Models\Statuslabel;
use App\Helpers\Helper; use App\Helpers\Helper;
use Illuminate\Support\Facades\Auth; use App\Models\Statuslabel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
/** /**
* This controller handles all actions related to Status Labels for * This controller handles all actions related to Status Labels for

View file

@ -1,12 +1,9 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Image; use App\Http\Requests\ImageUploadRequest;
use App\Models\Supplier; use App\Models\Supplier;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage;
/** /**
* This controller handles all actions related to Suppliers for * This controller handles all actions related to Suppliers for

View file

@ -2,10 +2,10 @@
namespace App\Http\Controllers\Users; namespace App\Http\Controllers\Users;
use App\Http\Controllers\Controller;
use App\Models\Ldap; use App\Models\Ldap;
use App\Services\LdapAd; use App\Services\LdapAd;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
class LDAPImportController extends Controller class LDAPImportController extends Controller

View file

@ -2,13 +2,12 @@
namespace App\Http\Controllers\Users; namespace App\Http\Controllers\Users;
use App\Http\Requests\AssetFileRequest;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog; use App\Models\Actionlog;
use App\Models\User; use App\Models\User;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\Response;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;

View file

@ -4,39 +4,19 @@ namespace App\Http\Controllers\Users;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Controllers\UserNotFoundException; use App\Http\Controllers\UserNotFoundException;
use App\Http\Requests\AssetFileRequest;
use App\Http\Requests\SaveUserRequest; use App\Http\Requests\SaveUserRequest;
use App\Models\Accessory;
use App\Models\Actionlog;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Company; use App\Models\Company;
use App\Models\Group; use App\Models\Group;
use App\Models\Ldap; use App\Models\Ldap;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\Location;
use App\Models\Setting;
use App\Models\User; use App\Models\User;
use App\Notifications\WelcomeNotification; use App\Notifications\WelcomeNotification;
use Artisan;
use Auth; use Auth;
use Config;
use Crypt;
use DB;
use Gate;
use HTML;
use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\Request;
use Input; use Input;
use Lang;
use League\Csv\Reader;
use Mail;
use Redirect; use Redirect;
use Response;
use Str; use Str;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\StreamedResponse;
use URL;
use View; use View;
/** /**

View file

@ -7,13 +7,11 @@ use App\Models\AssetModel;
use App\Models\Company; use App\Models\Company;
use App\Models\Setting; use App\Models\Setting;
use App\Models\User; use App\Models\User;
use App\Notifications\RequestAssetNotification;
use App\Notifications\RequestAssetCancelationNotification; use App\Notifications\RequestAssetCancelationNotification;
use App\Notifications\RequestAssetNotification;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use Redirect; use Redirect;
use Illuminate\Http\Request;
/** /**
* This controller handles all actions related to the ability for users * This controller handles all actions related to the ability for users

View file

@ -2,8 +2,8 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure;
use Auth; use Auth;
use Closure;
class CheckForDebug class CheckForDebug
{ {

View file

@ -2,12 +2,8 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure;
use Config;
use Route;
use Schema;
use App\Models\User;
use App\Models\Setting; use App\Models\Setting;
use Closure;
class CheckForSetup class CheckForSetup
{ {

View file

@ -2,9 +2,9 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use App\Models\Setting;
use Auth; use Auth;
use Closure; use Closure;
use App\Models\Setting;
class CheckForTwoFactor class CheckForTwoFactor
{ {

View file

@ -2,9 +2,8 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure;
use Config;
use App\Models\Setting; use App\Models\Setting;
use Closure;
class CheckLocale class CheckLocale
{ {

View file

@ -3,8 +3,6 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure; use Closure;
use Config;
use Route;
use Gate; use Gate;
class CheckPermissions class CheckPermissions

View file

@ -2,8 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Http\Requests\Request;
class AssetCheckinRequest extends Request class AssetCheckinRequest extends Request
{ {
/** /**

View file

@ -2,8 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Http\Requests\Request;
class AssetCheckoutRequest extends Request class AssetCheckoutRequest extends Request
{ {
/** /**

View file

@ -3,8 +3,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use Symfony\Component\HttpFoundation\JsonResponse;
class AssetFileRequest extends Request class AssetFileRequest extends Request
{ {
/** /**

View file

@ -5,7 +5,6 @@ namespace App\Http\Requests;
use App\Models\SnipeModel; use App\Models\SnipeModel;
use Intervention\Image\Facades\Image; use Intervention\Image\Facades\Image;
use Storage; use Storage;
use Illuminate\Support\Facades\File;
class ImageUploadRequest extends Request class ImageUploadRequest extends Request
{ {

View file

@ -2,7 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Models\LicenseSeat;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
class LicenseCheckoutRequest extends FormRequest class LicenseCheckoutRequest extends FormRequest

View file

@ -2,7 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Helpers\Helper; use App\Helpers\Helper;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest abstract class Request extends FormRequest

View file

@ -2,7 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Http\Requests\Request;
use App\Models\Setting; use App\Models\Setting;
class SaveUserRequest extends Request class SaveUserRequest extends Request

View file

@ -2,7 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Http\Requests\Request;
use Session; use Session;
class SettingsLdapRequest extends Request class SettingsLdapRequest extends Request

View file

@ -2,8 +2,6 @@
namespace App\Http\Requests; namespace App\Http\Requests;
use App\Http\Requests\Request;
class SetupUserRequest extends Request class SetupUserRequest extends Request
{ {
/** /**

View file

@ -1,10 +1,10 @@
<?php <?php
namespace App\Http\Transformers; namespace App\Http\Transformers;
use App\Helpers\Helper;
use App\Models\Accessory; use App\Models\Accessory;
use Gate; use Gate;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Collection;
use App\Helpers\Helper;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
class AccessoriesTransformer class AccessoriesTransformer

View file

@ -1,11 +1,10 @@
<?php <?php
namespace App\Http\Transformers; namespace App\Http\Transformers;
use App\Helpers\Helper;
use App\Models\Actionlog; use App\Models\Actionlog;
use App\Models\Setting; use App\Models\Setting;
use Gate;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Collection;
use App\Helpers\Helper;
class ActionlogsTransformer class ActionlogsTransformer
{ {

Some files were not shown because too many files have changed in this diff Show more