Fix unsetMethod in ModelsCommand (#1453)

* Fix unsetMethod in ModelsCommand

* composer fix-style

---------

Co-authored-by: Barry vd. Heuvel <[email protected]>
Co-authored-by: laravel-ide-helper <[email protected]>
This commit is contained in:
leo108
2024-02-07 21:48:09 +01:00
committed by GitHub
co-authored by Barry vd. Heuvel laravel-ide-helper
parent 2535f8e6ab
commit 409bbf665b
4 changed files with 11 additions and 3 deletions
+6 -1
View File
@@ -892,7 +892,12 @@ class ModelsCommand extends Command
public function unsetMethod($name)
{
unset($this->methods[strtolower($name)]);
foreach ($this->methods as $k => $v) {
if (strtolower($k) === strtolower($name)) {
unset($this->methods[$k]);
return;
}
}
}
public function getMethodType(Model $model, string $classType)