Skip to content

Commit

Permalink
pass model name for getModelController helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kuo authored and jwkuo committed Nov 27, 2023
1 parent e05f4f4 commit 95aab2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helpers/modules_helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 95aab2c

Please sign in to comment.