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

[7.x] Load anonymous components from packages #33954

Merged
merged 1 commit into from
Aug 20, 2020
Merged

[7.x] Load anonymous components from packages #33954

merged 1 commit into from
Aug 20, 2020

Conversation

iamabdeldayem
Copy link
Contributor

@iamabdeldayem iamabdeldayem commented Aug 20, 2020

This PR extends this #31363.

This will enable packages' developers to render their anonymous components in a similar way to rendering views.

PackageServiceProvider https://laravel.com/docs/7.x/packages#views

$this->loadViewsFrom(__DIR__.'/path/to/views', 'courier');

welcome.blade.php

<x-courier::avatar size="60" />

will look for the
/path/to/views/components/avatar.blade.php

@iamabdeldayem iamabdeldayem changed the title Load anonymous components from packages [7.x] Load anonymous components from packages Aug 20, 2020
@taylorotwell taylorotwell merged commit 8d4120a into laravel:7.x Aug 20, 2020
@driesvints
Copy link
Member

@iamabdeldayem yes! Great pr 👏

@iamabdeldayem
Copy link
Contributor Author

@driesvints Thanks!

@stancl
Copy link
Contributor

stancl commented Sep 8, 2020

This just made my life so much easier.

I'm using TONS of anonymous components in a package and I don't have to manually register them anymore.

Thanks so much! ❤️

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.

4 participants