Closed juanpaulo10 closed 6 years ago
👌 I'll try.
It is important to understand that this isn't exactly a laravel-modules specific feature. Rather, it is built right into Laravel. Doing the following in e.g. a service provider, will yield the same results:
class MyServiceProvider extends ServiceProvider
{
public function boot()
{
// Load translations from here using the 'foo'-prefix
$this->loadViewsFrom('/path/to/the/views, 'foo');
}
}
From here, I can do view('foo:blog.index)
and the foo::
part is computed to the directory I specified in MyServiceProvider. That is, Laravel will look for the file
/path/to/the/views/blog/index.blade.php
I'm assuming this is what laravel-modules uses behind the scenes as well.
Welcome to the new version.
Just to find the Modules
folder. 😂
Documentation on How to use it on laravel modules project would be great. I couldn't find it.
Good Day, I find that your extension is so useful when developing on my laravel projects. However, I would like to suggest to add support for laravel-modules package wherein it uses view('module_name::layout.master') naming convention in the view facade.
This would be nice especially for developing larger projects. Thank you :)