diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 1deaa5d104..f16a6fc8f0 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -84,7 +84,7 @@ class SettingsController extends Controller } $pageURL = $protocol.$host.$_SERVER['REQUEST_URI']; - $start_settings['url_config'] = url('/').'/setup'; + $start_settings['url_config'] = config('app.url').'/setup'; $start_settings['url_valid'] = ($start_settings['url_config'] === $pageURL); $start_settings['real_url'] = $pageURL; $start_settings['php_version_min'] = true; diff --git a/app/Http/Middleware/CheckForSetup.php b/app/Http/Middleware/CheckForSetup.php index b4beb70588..4e399ffcff 100644 --- a/app/Http/Middleware/CheckForSetup.php +++ b/app/Http/Middleware/CheckForSetup.php @@ -20,13 +20,13 @@ class CheckForSetup if (Setting::setupCompleted()) { if ($request->is('setup*')) { - return redirect(url('/')); + return redirect(config('app.url')); } else { return $next($request); } } else { if (! ($request->is('setup*')) && ! ($request->is('.env')) && ! ($request->is('health'))) { - return redirect(url('/').'/setup'); + return redirect(config('app.url').'/setup'); } return $next($request); diff --git a/app/Models/Location.php b/app/Models/Location.php index 8181f406cd..8cea9bda12 100755 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -267,7 +267,7 @@ class Location extends SnipeModel foreach ($locations_with_children[$parent_id] as $location) { $location->use_text = $prefix.' '.$location->name; - $location->use_image = ($location->image) ? url('/').'/uploads/locations/'.$location->image : null; + $location->use_image = ($location->image) ? config('app.url').'/uploads/locations/'.$location->image : null; $results[] = $location; //now append the children. (if we have any) if (array_key_exists($location->id, $locations_with_children)) { diff --git a/app/Notifications/FirstAdminNotification.php b/app/Notifications/FirstAdminNotification.php index 71637b5e80..83e3a65de7 100644 --- a/app/Notifications/FirstAdminNotification.php +++ b/app/Notifications/FirstAdminNotification.php @@ -24,7 +24,7 @@ class FirstAdminNotification extends Notification $this->_data['last_name'] = $content['last_name']; $this->_data['username'] = $content['username']; $this->_data['password'] = $content['password']; - $this->_data['url'] = url('/'); + $this->_data['url'] = config('app.url'); } /** diff --git a/app/Notifications/WelcomeNotification.php b/app/Notifications/WelcomeNotification.php index a5754be4d9..1e27ca7364 100644 --- a/app/Notifications/WelcomeNotification.php +++ b/app/Notifications/WelcomeNotification.php @@ -24,7 +24,7 @@ class WelcomeNotification extends Notification $this->_data['last_name'] = htmlspecialchars_decode($content['last_name']); $this->_data['username'] = htmlspecialchars_decode($content['username']); $this->_data['password'] = htmlspecialchars_decode($content['password']); - $this->_data['url'] = url('/'); + $this->_data['url'] = config('app.url'); } /** diff --git a/app/Presenters/AssetModelPresenter.php b/app/Presenters/AssetModelPresenter.php index fd74108ee3..8e3d109045 100644 --- a/app/Presenters/AssetModelPresenter.php +++ b/app/Presenters/AssetModelPresenter.php @@ -210,7 +210,7 @@ class AssetModelPresenter extends Presenter public function imageUrl() { if (! empty($this->image)) { - return ''.$this->name.''; + return ''.$this->name.''; } return ''; @@ -223,7 +223,7 @@ class AssetModelPresenter extends Presenter public function imageSrc() { if (! empty($this->image)) { - return url('/').'/uploads/models/'.$this->image; + return config('app.url').'/uploads/models/'.$this->image; } return ''; diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index 4bfe4492ff..b5eefdf811 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -406,7 +406,7 @@ class UserPresenter extends Presenter } // Set a fun, gender-neutral default icon - return url('/').'/img/default-sm.png'; + return config('app.url').'/img/default-sm.png'; } /** diff --git a/app/Services/Saml.php b/app/Services/Saml.php index 3f39be29ff..f80b1c1fb9 100644 --- a/app/Services/Saml.php +++ b/app/Services/Saml.php @@ -161,7 +161,7 @@ class Saml //Let onelogin/php-saml know to use 'X-Forwarded-*' headers if it is from a trusted proxy OneLogin_Saml2_Utils::setProxyVars(request()->isFromTrustedProxy()); - data_set($settings, 'sp.entityId', url('/')); + data_set($settings, 'sp.entityId', config('app.url')); data_set($settings, 'sp.assertionConsumerService.url', route('saml.acs')); data_set($settings, 'sp.singleLogoutService.url', route('saml.sls')); data_set($settings, 'sp.x509cert', $setting->saml_sp_x509cert); diff --git a/resources/views/account/requestable-assets.blade.php b/resources/views/account/requestable-assets.blade.php index 002fc4dc5c..ceadd2e374 100644 --- a/resources/views/account/requestable-assets.blade.php +++ b/resources/views/account/requestable-assets.blade.php @@ -104,8 +104,8 @@ @if ($requestableModel->image) - - + + @endif diff --git a/resources/views/asset_maintenances/index.blade.php b/resources/views/asset_maintenances/index.blade.php index 69d3c2643b..f5deb48b61 100644 --- a/resources/views/asset_maintenances/index.blade.php +++ b/resources/views/asset_maintenances/index.blade.php @@ -54,11 +54,11 @@ function maintenanceActions(value, row) { var actions = ''; if ((row) && (row.available_actions.update === true)) { - actions += ' '; + actions += ' '; } actions += '' if ((row) && (row.available_actions.delete === true)) { - actions += '
- +

403 Forbidden.

- Sad panda. You are not authorized to do the thing. Maybe return to the dashboard, or contact your administrator. + Sad panda. You are not authorized to do the thing. Maybe return to the dashboard, or contact your administrator.

diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 03e140bd3a..77d7c32521 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -16,12 +16,12 @@
- +

404 Page not found.

Sad panda. We could not find the page you were looking for. - You should maybe return to the dashboard. + You should maybe return to the dashboard.

diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index 013d0f1ce6..4adb020d4e 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -29,7 +29,7 @@
- +

{{ trans('general.maintenance_mode') }}

diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 56876ba47a..1e44b98dc4 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -198,7 +198,7 @@ $.ajax({ type: 'GET', - url: "{{ url('/') }}/models/" + modelid + "/custom_fields", + url: "{{ config('app.url') }}/models/" + modelid + "/custom_fields", headers: { "X-Requested-With": 'XMLHttpRequest', "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content') @@ -230,7 +230,7 @@ if (status_id != '') { $(".status_spinner").css("display", "inline"); $.ajax({ - url: "{{url('/') }}/api/v1/statuslabels/" + status_id + "/deployable", + url: "{{config('app.url') }}/api/v1/statuslabels/" + status_id + "/deployable", headers: { "X-Requested-With": 'XMLHttpRequest', "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content') diff --git a/resources/views/hardware/requested.blade.php b/resources/views/hardware/requested.blade.php index 5a38d89ce5..25b2a51e28 100644 --- a/resources/views/hardware/requested.blade.php +++ b/resources/views/hardware/requested.blade.php @@ -64,7 +64,7 @@ @if (($request->itemType() == "asset") && ($request->requestable)) {{ $request->requestable->name }} @elseif (($request->itemType() == "asset_model") && ($request->requestable)) - {{ $request->requestable->name }} + {{ $request->requestable->name }} @endif @@ -72,11 +72,11 @@ @if ($request->itemType() == "asset") - + {{ $request->name() }} @elseif ($request->itemType() == "asset_model") - + {{ $request->name() }} @endif @@ -95,7 +95,7 @@ @if ($request->requestingUser()) - + {{ $request->requestingUser()->present()->fullName() }} @else @@ -106,9 +106,9 @@ @if ($request->itemType() == "asset") @if ($request->requestable->assigned_to=='') - {{ trans('general.checkout') }} + {{ trans('general.checkout') }} @else - {{ trans('general.checkin') }} + {{ trans('general.checkin') }} @endif @endif diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 2bb9bc8cf9..84792ec0c8 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -21,7 +21,7 @@ - +