File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -174,22 +174,20 @@ public function componentNameToPath($name): string
174174
175175 // Try direct component file first (e.g., form.input -> form/input.blade.php)...
176176 $ fullPath = $ basePath . '/ ' . $ componentPath . '.blade.php ' ;
177- if (file_exists ($ fullPath )) {
177+ if (file_exists ($ fullPath ) && ! is_dir ( $ fullPath ) ) {
178178 return $ fullPath ;
179179 }
180180
181181 // For root components, try index.blade.php (e.g., form -> form/index.blade.php)...
182- if (!str_contains ($ componentPath , '/ ' )) {
183- $ indexPath = $ basePath . '/ ' . $ componentPath . '/index.blade.php ' ;
184- if (file_exists ($ indexPath )) {
185- return $ indexPath ;
186- }
182+ $ indexPath = $ basePath . '/ ' . $ componentPath . '/index.blade.php ' ;
183+ if (file_exists ($ indexPath ) && ! is_dir ($ indexPath )) {
184+ return $ indexPath ;
185+ }
187186
188- // Try same-name file (e.g., card -> card/card.blade.php)...
189- $ sameNamePath = $ basePath . '/ ' . $ componentPath . '/ ' . $ componentPath . '.blade.php ' ;
190- if (file_exists ($ sameNamePath )) {
191- return $ sameNamePath ;
192- }
187+ // Try same-name file (e.g., card -> card/card.blade.php)...
188+ $ sameNamePath = $ basePath . '/ ' . $ componentPath . '/ ' . $ componentPath . '.blade.php ' ;
189+ if (file_exists ($ sameNamePath ) && ! is_dir ($ sameNamePath )) {
190+ return $ sameNamePath ;
193191 }
194192 }
195193 }
You can’t perform that action at this time.
0 commit comments