'Extending layout from another directory in Laravel 5.4 using module structure
I'm developing a module and I'm trying to extend bill.php.blade in index.php
The directory structure looks like this:
├── modules
│ ├── Blog
│ │ |
│ │ ├── Resources
│ │ │ ├── lang
│ │ │ └── views->index.blade.php
│ │ │ └── layouts
├── resources
|
└── views
├── layouts->bill.blade.php
So when I try @extends('resources.views.layouts.bill) it throws View [resources.views.layouts.bill] not found
Any ideas? Thanks in advance
Solution 1:[1]
Yes, you can do it editing your config/view.php file:
'paths' => [
resource_path('views'),
],
Add your paths to the array.
'paths' => [
resource_path('views'),
base_path('modules/Blog/Resources/views')
],
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
