We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 589b964 commit 16e5d77Copy full SHA for 16e5d77
1 file changed
src/Illuminate/View/Compilers/ComponentTagCompiler.php
@@ -208,8 +208,18 @@ protected function componentClass(string $component)
208
{
209
$viewFactory = Container::getInstance()->make(Factory::class);
210
211
- if (isset($this->aliases[$component]) && $viewFactory->exists($view = $this->aliases[$component])) {
212
- return $view;
+ if (isset($this->aliases[$component])) {
+ if (class_exists($alias = $this->aliases[$component])) {
213
+ return $alias;
214
+ }
215
+
216
+ if ($viewFactory->exists($alias)) {
217
218
219
220
+ throw new InvalidArgumentException(
221
+ "Unable to locate the set alias [{$alias}] for component [{$component}]."
222
+ );
223
}
224
225
if (class_exists($class = $this->guessClassName($component))) {
0 commit comments