我正在使用Laravel 5和AngularJS开发一个Web应用程序。我在客户端使用纯AngularJS应用程序,并将客户端应用程序文件(视图)放在我的public
文件夹中。
在Laravel 4中,我可以从bootstrap/start.php
文件中更改路径。但是在Laravel 5中,我找不到start.php
文件。那么我该在Laravel 5中的哪里更改配置?
config/view.php
文件的第16行(“View Storage Paths”部分)。'paths' => [
realpath(base_path('resources/views'))
],
所以你可以将其更改为realpath(base_path('public/assets/views'))
,以处于你的公共路径中。
'paths' => [
// src/MyNamespace/resources
realpath(base_path('src/MyNamespace/resources')),
// app/resources
realpath(app_path('resources'))
],
app_path()
、base_path()
或两者都不使用。