如何在Laravel 5中更改视图文件夹?

I am developing an web application using Laravel 5 and AngularJS. I am using pure angularJS app for the client side and I am putting the client app files (views) in my public folder.

In Laravel 4, I could change the path from the bootstrap/start.php file. But in Laravel 5, I can not see the start.php file. So where do I change the configuration in Laravel 5?

See line 16 of config/view.php (the "View Storage Paths" section)

'paths' => [
    realpath(base_path('resources/views'))
],

So you might change it to realpath(base_path('public/assets/views')) to be in your public path.


Additional Examples

'paths' => [

    // src/MyNamespace/resources
    realpath(base_path('src/MyNamespace/resources')),

    // app/resources
    realpath(app_path('resources'))

],
  • You can provide multiple search locations
  • You can use app_path(), base_path(), or neither.