Skip to content

Fix bug with multiple hooks in a blade template#7

Merged
vroomfondle merged 1 commit into
masterfrom
MultipleBladeHooks
Jul 11, 2022
Merged

Fix bug with multiple hooks in a blade template#7
vroomfondle merged 1 commit into
masterfrom
MultipleBladeHooks

Conversation

@thybag
Copy link
Copy Markdown
Member

@thybag thybag commented Jul 11, 2022

Previously the blade template was making use of a use statement to import the hook facade - this meant when multiple hooks were set within the blade template, the use statement would get generated in to the result multiple times causing Cannot use CoInvestor\LaraHook\Facades\Hook as Hook because the name is already in use in ... errors.

This has been resolved by swapping over to using the fully qualified facade name instead.
A test has been added to ensure this functions as expected.

Thanks to #6 for reporting this bug.

… to setting the same use multiple times.

Swaps to use fully qualified facade path.
Add test to ensure its resolved.
@thybag thybag requested review from Xulai and vroomfondle July 11, 2022 16:11
@vroomfondle vroomfondle merged commit aafc952 into master Jul 11, 2022
@vroomfondle vroomfondle deleted the MultipleBladeHooks branch July 11, 2022 18:43
@vroomfondle vroomfondle restored the MultipleBladeHooks branch July 11, 2022 18:44
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