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

[11.x] Add prependLocation method to View Factory #52806

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

nshiro
Copy link
Contributor

@nshiro nshiro commented Sep 16, 2024

This PR adds the prependLocation method to the View Factory.
This is useful if you want to prepend paths using the View Facade.

Before

use Illuminate\Support\Facades\View;
2024-09-16_16h55_23

After

2024-09-16_16h56_39

Illuminate\View\ViewFinderInterface doesn't have prependLocation. However, I'll leave it as is since adding it could be a breaking change if someone implements it.

@taylorotwell taylorotwell merged commit 6143186 into laravel:11.x Sep 16, 2024
33 checks passed
@nshiro nshiro deleted the prepend_location branch September 16, 2024 21:58
@shaedrich
Copy link
Contributor

Shouldn't addLocation() be appendLocation() then? And since it is not, wouldn't it have been better to add a flag the turns appending into prepending to addLocation() to stay consistent?

@nshiro
Copy link
Contributor Author

nshiro commented Sep 24, 2024

I think addLocation() would have been better.
However, I personally think it is simple enough as it is.

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

Successfully merging this pull request may close these issues.

3 participants