Replies: 1 comment
-
The framework/src/Illuminate/View/Compilers/BladeCompiler.php Lines 896 to 905 in c4e8cf5 Before<x-button type="danger" /> After@button(['type' = 'danger'])
// or
@button
.... content
@endbutton |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Howdy friends 👋
I have a Blade-related question/issue that I was hoping someone could help me with 🙏
Note
Scroll down to view a short 30-second video demonstrating the issue.
ℹ️ Here's what I am doing
I am using Blade::component inside of my
AppServiceProvider
to create shorter names for my Blade components, like soHowever, I've also noticed that Blade offers an aliasComponent method, which appears to be more suitable for my needs. Unfortunately, when I use this method:
and try to render the⚠️ Unable to locate a class or view for component [button].
<x-button>
blade component. I receive the following error🎬 Short Video
Here is a quick 30 second video of the issue within a blank Laravel application:
alias-component-not-working-as-expected.mp4
As you can see, the Blade::component method functions correctly; however, the Blade::aliasComponent is not working as I would have expected.
🙋♂️ The Question
Does it look like there is an error with the
aliasComponent
method, or am I not using it as intended? 🤷♂️Really appreciate you guys! Look forward to hearing back soon.
Thanks a ton!
Beta Was this translation helpful? Give feedback.
All reactions