Skip to content

Commit 37e22fd

Browse files
committed
fix replace slash to backslash in the class name
1 parent c3b1a1e commit 37e22fd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

php-templates/blade-components.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ protected function getStandardClasses()
9090
$class = \Illuminate\Support\Str::of($item['path'])
9191
->after('View/Components/')
9292
->replace('.php', '')
93+
->replace('/', '\\')
9394
->prepend($appNamespace . 'View\\Components\\')
9495
->toString();
9596

src/templates/blade-components.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ $components = new class {
9090
$class = \\Illuminate\\Support\\Str::of($item['path'])
9191
->after('View/Components/')
9292
->replace('.php', '')
93+
->replace('/', '\\\\')
9394
->prepend($appNamespace . 'View\\\\Components\\\\')
9495
->toString();
9596

0 commit comments

Comments
 (0)