this works but is there anyway to make the views accessible in the config somewhere?
Do you mean is there a configuration value to set namespaces for Views? If so, no.
You could definitely do this, you could modify app/config/view.php
to include:
return [
// Other config values
'namespaces' => ['foo' => 'path/to/foo/views'],
];
Then, in your app/start/global.php
file (or a service provider, but that's outside the scope of this question):
foreach (Config::get('view.namespaces') as $namespace => $hint)
{
View::addNamespace($namespace, $hint);
}
Hey that is an excellent answer :) is it conventional to do this? Or is this considered extending the framework.
Thanks for prompt and precise answers.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community