How to include a blade file which has a full stop (.) as part of the file name in blade

↘锁芯ラ 提交于 2019-12-22 08:40:06

问题


I have a partial view with the following path.

/views/acp/review/check.details.blade.php

How do I include such a file using blade because If I do

@include('views.acp.review.check.details')

I get an error because It attempts to parse check.details as check/details

Please how can I include the file having the full stop?

Edit: I don't want to Rename the file


回答1:


Blade uses the . as directory separators and you probably don't want to change that :)

Rename the file to:

/views/acp/review/check-details.blade.php

and use:

@include('views.acp.review.check-details') 


来源:https://stackoverflow.com/questions/41585874/how-to-include-a-blade-file-which-has-a-full-stop-as-part-of-the-file-name-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!