Skip to content

Commit 151cdc2

Browse files
update
1 parent 905840c commit 151cdc2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static function config($key, $default = null, string $base_folder = 'conf
3636
$parts = explode('.', $key);
3737

3838
// Get the file name
39-
$filePath = base_path("{$base_folder}/{$parts[0]}.php");
39+
$filePath = self::formatWithBaseDirectory("{$base_folder}/{$parts[0]}.php");
4040

4141
// Check if the configuration file exists
4242
if (file_exists($filePath)) {

Traits/TameTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private static function getBasePath($path = null)
221221
// removing default base directory path if added by default
222222
$path = Str::replace(Server::formatWithBaseDirectory(), '', $path);
223223

224-
return base_path($path);
224+
return Server::formatWithBaseDirectory($path);
225225
}
226226

227227
/**

View.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Tamedevelopers\Support;
66

77
use Exception;
8+
use Tamedevelopers\Support\Server;
89
use Tamedevelopers\Support\Capsule\File;
910
use Tamedevelopers\Support\Traits\ViewTrait;
1011

@@ -80,7 +81,7 @@ class View{
8081
*/
8182
public function __construct($viewPath = null, $data = [])
8283
{
83-
$this->basePath = base_path();
84+
$this->basePath = Server::formatWithBaseDirectory();
8485
$this->viewPath = $viewPath;
8586
$this->data = array_merge(self::getSharedData(), $data);
8687
}

0 commit comments

Comments
 (0)