Skip to content

Commit 172dd01

Browse files
authored
Merge pull request #5547 from Abbotton/patch-1
[Fix] 修复未引用Str类导致在Laravel5.5 LTS版本中报错的问题
2 parents 5b2e19c + 04be516 commit 172dd01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AdminServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Encore\Admin\Layout\Content;
66
use Illuminate\Routing\Router;
77
use Illuminate\Support\Arr;
8+
use Illuminate\Support\Str;
89
use Illuminate\Support\Facades\Blade;
910
use Illuminate\Support\ServiceProvider;
1011

@@ -99,7 +100,7 @@ public function boot()
99100
*/
100101
protected function ensureHttps()
101102
{
102-
$is_admin = \Str::startsWith(request()->getRequestUri(), '/'.ltrim(config('admin.route.prefix'), '/'));
103+
$is_admin = Str::startsWith(request()->getRequestUri(), '/'.ltrim(config('admin.route.prefix'), '/'));
103104
if ((config('admin.https') || config('admin.secure')) && $is_admin) {
104105
url()->forceScheme('https');
105106
$this->app['request']->server->set('HTTPS', true);

0 commit comments

Comments
 (0)