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 ''; + return ''; } 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 @@
- 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.
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.