Skip to content

Commit f092908

Browse files
authored
1.6.2
1 parent 05fd56c commit f092908

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

routes/helpers/base.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
Application helpers
5+
*/
6+
7+
// Load Thems
8+
function view($path, $data = [])
9+
{
10+
// Replace all . to /
11+
$path = str_replace('.', '/', $path);
12+
13+
extract($data);
14+
15+
// include views folder path
16+
$viewPath = 'views/' . $path . '.php';
17+
18+
include_once $viewPath;
19+
}

0 commit comments

Comments
 (0)