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

Allowed to keep the view paths added at runtime after setting theme #141

Open
videni opened this issue Nov 11, 2022 · 0 comments
Open

Allowed to keep the view paths added at runtime after setting theme #141

videni opened this issue Nov 11, 2022 · 0 comments

Comments

@videni
Copy link

videni commented Nov 11, 2022

foreach ($this->laravelViewsPath as $path) {

May be we should use the config('view.paths'); to get views paths instead of setting it to the laravelViewsPath, so It's possible to get user's configured paths at runtime.

Add a view path before setting theme like following

        app('view.finder')->addLocation($sourcePath);

Then try to set current theme by

Themes::set('one_theme')

now the above path lost. instead of using the addLocation method, we can add new path to view.paths config ,

app('config')->push('view.paths', $sourcePath);

clearly say we want to keep the path like statically configured view paths after setting theme.

@videni videni changed the title Allow to keep the view paths set at runtime when set theme Allow to keep the view paths set at runtime when setting theme Nov 11, 2022
@videni videni changed the title Allow to keep the view paths set at runtime when setting theme Allowed to keep the view paths added at runtime when setting theme Nov 11, 2022
@videni videni changed the title Allowed to keep the view paths added at runtime when setting theme Allowed to keep the view paths added at runtime after setting theme Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant