diff --git a/.env.example b/.env.example
index 7340c448e..a6faea667 100644
--- a/.env.example
+++ b/.env.example
@@ -5,7 +5,6 @@ APP_INSTALLED=false
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
-APP_URL=
APP_SCHEDULE_TIME="09:00"
DB_CONNECTION=mysql
diff --git a/.env.testing b/.env.testing
index e312103a3..fcbe888bb 100644
--- a/.env.testing
+++ b/.env.testing
@@ -5,7 +5,6 @@ APP_INSTALLED=false
APP_KEY=base64:xBC+BxlC7sXhYAtpTZv8TYAHqoPgsJaXL0S5Id6BbBc=
APP_DEBUG=true
APP_LOG_LEVEL=debug
-APP_URL=http://akaunting.test
APP_SCHEDULE_TIME="09:00"
DB_CONNECTION=sqlite
diff --git a/app/Traits/Modules.php b/app/Traits/Modules.php
index 5df2fdee7..10427551d 100644
--- a/app/Traits/Modules.php
+++ b/app/Traits/Modules.php
@@ -551,7 +551,7 @@ trait Modules
$headers['headers'] = [
'Authorization' => 'Bearer ' . setting('general.api_token'),
'Accept' => 'application/json',
- 'Referer' => env('APP_URL'),
+ 'Referer' => url('/'),
'Akaunting' => version('short'),
'Language' => language()->getShortCode()
];
diff --git a/app/Traits/SiteApi.php b/app/Traits/SiteApi.php
index 173475683..63d3758ee 100644
--- a/app/Traits/SiteApi.php
+++ b/app/Traits/SiteApi.php
@@ -17,7 +17,7 @@ trait SiteApi
$headers['headers'] = array(
'Authorization' => 'Bearer ' . setting('general.api_token'),
'Accept' => 'application/json',
- 'Referer' => env('APP_URL'),
+ 'Referer' => url('/'),
'Akaunting' => version('short'),
'Language' => language()->getShortCode()
);
diff --git a/app/Utilities/Installer.php b/app/Utilities/Installer.php
index 3956f5d97..2a372a82d 100644
--- a/app/Utilities/Installer.php
+++ b/app/Utilities/Installer.php
@@ -113,7 +113,6 @@ class Installer
// Update .env file
static::updateEnv([
'APP_KEY' => 'base64:'.base64_encode(random_bytes(32)),
- 'APP_URL' => url('/'),
]);
}
diff --git a/config/charts.php b/config/charts.php
index 1c332607c..4a19f6ad7 100644
--- a/config/charts.php
+++ b/config/charts.php
@@ -94,7 +94,7 @@ return [
'chartjs' => [
'scripts' => [
- env('APP_URL') . '/public/js/chartjs/Chart.min.js',
+ asset('/public/js/chartjs/Chart.min.js'),
],
],
diff --git a/config/filesystems.php b/config/filesystems.php
index df225fc2a..370d5a2be 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -51,14 +51,14 @@ return [
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
- 'url' => env('APP_URL').'/storage',
+ 'url' => url('/') . '/storage',
'visibility' => 'public',
],
'uploads' => [
'driver' => 'local',
'root' => storage_path('app/uploads'),
- 'url' => env('APP_URL').'/uploads',
+ 'url' => url('/') . '/uploads',
'visibility' => 'private',
],
diff --git a/resources/views/partials/admin/head.blade.php b/resources/views/partials/admin/head.blade.php
index d2f559b71..4ce7d306b 100644
--- a/resources/views/partials/admin/head.blade.php
+++ b/resources/views/partials/admin/head.blade.php
@@ -60,7 +60,7 @@
diff --git a/resources/views/partials/customer/head.blade.php b/resources/views/partials/customer/head.blade.php
index b61171dce..fed7d7d2c 100644
--- a/resources/views/partials/customer/head.blade.php
+++ b/resources/views/partials/customer/head.blade.php
@@ -66,7 +66,7 @@
diff --git a/resources/views/partials/link/head.blade.php b/resources/views/partials/link/head.blade.php
index b61171dce..fed7d7d2c 100644
--- a/resources/views/partials/link/head.blade.php
+++ b/resources/views/partials/link/head.blade.php
@@ -66,7 +66,7 @@
diff --git a/resources/views/partials/modules/head.blade.php b/resources/views/partials/modules/head.blade.php
index edb945fa3..8aa1c8562 100644
--- a/resources/views/partials/modules/head.blade.php
+++ b/resources/views/partials/modules/head.blade.php
@@ -60,7 +60,7 @@