Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for views in packages #5

Open
pun-ky opened this issue Aug 19, 2015 · 3 comments
Open

Support for views in packages #5

pun-ky opened this issue Aug 19, 2015 · 3 comments

Comments

@pun-ky
Copy link

pun-ky commented Aug 19, 2015

Hi! Thx for Fenom adapter for Laravel, but I cannot use it.

My application is built from multiple packages and each package has their own views. While using blade I was used to just reference view from concrete package by writing `view('my_package::some.template') but your adapter seems to not support that case.

I got: Provider for 'my_package' not found

    public function getProvider($scm = false)
    {
        if ($scm) {
            if (isset($this->_providers[$scm])) {
                return $this->_providers[$scm];
            } else {
                throw new InvalidArgumentException("Provider for '$scm' not found");
            }
        } e

Is it a chance to improve it?

Going futher config parameter:

    'template_path' => base_path() . '/resources/views/fenom',

seems to be not legit, because we can have multiple directories with views...

For more info see: http://laravel.com/docs/5.1/packages#views

Maybe it will be more nice if FenomViewServiceProvider will register Fenom template engine alongside Blade using:

http://laravel.com/api/5.1/Illuminate/View/Factory.html#method_addExtension

@pafnuty
Copy link
Member

pafnuty commented Aug 19, 2015

@bzick, @maxicms need your help 🔦

@pun-ky
Copy link
Author

pun-ky commented Aug 19, 2015

Temporarily I implemented such simpler adapter available here: https://github.com/neva-dev/laravel-fenom

@maxisoft-git
Copy link
Member

Today I'll try to make changes to the code to support multiple templates directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants