From 95aab2c2f9b07fb1a8e9624b58e9097071670ce6 Mon Sep 17 00:00:00 2001 From: Jonathan Kuo Date: Tue, 31 Oct 2023 10:11:37 -0400 Subject: [PATCH] pass model name for getModelController helper function --- src/Helpers/modules_helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helpers/modules_helpers.php b/src/Helpers/modules_helpers.php index a3f119bf7..243b85704 100644 --- a/src/Helpers/modules_helpers.php +++ b/src/Helpers/modules_helpers.php @@ -92,7 +92,7 @@ function getModelController(TwillModelContract $model) if (!class_exists($controller)) { try { - $controller = TwillCapsules::getCapsuleForModel($model)->getControllerClass(); + $controller = TwillCapsules::getCapsuleForModel($modelName)->getControllerClass(); } catch (NoCapsuleFoundException) { throw new Exception($controller . ' not found'); }