Laravel不同的视图文件夹

发布于 2025-02-09 07:14:23 字数 607 浏览 4 评论 0原文

我已经下载了一个项目,并注意到该项目使用来自不同目录的视图而不是通常的目录,

\resources\views 

而是创建一个新的文件夹名称主题并在其中插入所有视图。

\themes\app\views

view view divie directory

,我在控制器中也注意到他们使用getapptheme()

使用getapptheme()

任何人都知道我如何在 \ resources \ resources \ resources \ yestapptheme ()查看我所有视图文件的文件夹。以及如何使用getAppTheme()返回视图,就像图片中一样。

I have downloaded a project and I noticed that the project use views from different directory not the usual directory which are

\resources\views 

but instead it create a new folder name themes and insert all the views in there.

\themes\app\views

Views Directory

and also I noticed in the controller they return view by using getAppTheme()

Return View using getAppTheme()

Anyone know how I can create a new folder outside the \resources\views folder for all my views file. And how I can return view using getAppTheme() just like in the picture.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

青丝拂面 2025-02-16 07:14:23

在config/views.php上的l​​aravel上有一个config供查看路径,

您可以通过更改此处配置

'paths' => [
    resource_path('views'), //this value you need to change
],

there a config for view path at laravel located at config/views.php

you can configure there by change this

'paths' => [
    resource_path('views'), //this value you need to change
],
温柔女人霸气范 2025-02-16 07:14:23

谢谢,但是我要寻找的答案在这里
https://github.com/shipu/shipu/themevel
无论如何,再次感谢

Thanks but the answer I was looking for is in here
https://github.com/Shipu/themevel
Anyway, thanks again

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文