Home > OS >  How to force the action to return a view located outside "resource/view" laravel
How to force the action to return a view located outside "resource/view" laravel

Time:07-13

How can I make the action to return a view that located inside the folder "packages/mypackage/view" (not inside the laravel resource/view folder) ?

CodePudding user response:

Inside config/view.php there is a paths key within which you can specify the array of paths to your view files. Order by preferred priority.

// config/view.php
return [
    'paths' => [
        resource_path('views'),
        realpath(base_path('resources/customViews')),
    ],
// ...
  • Related