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

Not working with View extra locations #94

Open
Nuranto opened this issue Jun 27, 2018 · 2 comments
Open

Not working with View extra locations #94

Nuranto opened this issue Jun 27, 2018 · 2 comments
Assignees

Comments

@Nuranto
Copy link

Nuranto commented Jun 27, 2018

It works fine with a basic configuration. But it does not work with View::addLocation();

For example, if you have one route like :

Route::domain('www.admindomain.tld')->group(function()
{
    View::addLocation('admin');
    
    Route::get('/', function () {
        return view('welcome');
    });
    
});

and you have your theme in views/admin/{default_theme}/, it does not work.

@Nuranto
Copy link
Author

Nuranto commented Jun 27, 2018

If it is tricky to resolve, maybe is there some better way to do what I'm trying to do.
Which is :

I want areas, and for each areas, themes.
For example :

view/admin/default/welcome.blade.php
view/admin/other_theme/welcome.blade.php
view/frontend/default/welcome.blade.php
view/frontend/other_frontend_theme/welcome.blade.php
view/other_area/default/welcome.blade.php
view/other_area/other_theme/welcome.blade.php
...

@Nuranto
Copy link
Author

Nuranto commented Jun 30, 2018

Managed to do it by surcharging the ThemeServiceProvider, and adding a config(['view.paths' => $viewPaths]); logic before the instatiation of Themes...

@igaster igaster self-assigned this Jan 31, 2019
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

2 participants