Skip to content

Conversation

klimov-paul
Copy link
Contributor

Blade directive setup has been refactored:

  • use Container::extend(), allowing lazy-load Blade compiler instantiation as well as correct functioning, when Blade package is not installed.

  • Add 'blade.compiler' to SharedDataServiceProvider::provides(), ensuring SharedData as well as its Blade directive will be registered correctly once Blade is requested from Container

  • Add the configuration for the Blade directive name, as 'shared' is too common and may conflict with other libraries.

@hivokas
Copy link
Member

hivokas commented Feb 22, 2020

Thanks, @klimov-paul!
Could you add a test please?

@klimov-paul
Copy link
Contributor Author

Blade directive is already tested here:
https://github.com/coderello/laravel-shared-data/blob/1.0/tests/SharedDataTest.php#L296

This PR is just a refactoring.

@hivokas
Copy link
Member

hivokas commented Feb 22, 2020

I mean a test for a custom blade directive name.

@klimov-paul
Copy link
Contributor Author

Test has been added.

@hivokas
Copy link
Member

hivokas commented Feb 24, 2020

Thanks for the contribution!

@hivokas hivokas merged commit 82b2df4 into coderello:1.0 Feb 24, 2020
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.

2 participants