We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efb4517 commit d75b6ceCopy full SHA for d75b6ce
1 file changed
system/support/common.php
@@ -63,6 +63,14 @@ function show_403() {
63
die;
64
}
65
66
+function model(string $model) {
67
+ if(file_exists($path = APPPATH . "/models/$model.php")) {
68
+ require $path;
69
+ } else {
70
+ throw new Exception("Model $model is not found");
71
+ }
72
+}
73
+
74
function view(string $view, array $params = []) {
75
extract($params);
76
if(file_exists($path = APPPATH . "/views/$view.php")) {
0 commit comments