File tree Expand file tree Collapse file tree 13 files changed +23
-22
lines changed Expand file tree Collapse file tree 13 files changed +23
-22
lines changed Original file line number Diff line number Diff line change 12
12
}
13
13
},
14
14
"require" : {
15
- "vlucas/phpdotenv" : " ^5.0"
15
+ "vlucas/phpdotenv" : " ^5.0" ,
16
+ "thecodeholic/php-mvc-core" : " ^v1.0.3"
16
17
}
17
18
}
Original file line number Diff line number Diff line change 8
8
namespace app \controllers ;
9
9
10
10
11
- use app \ core \Controller ;
11
+ use thecodeholic \ phpmvc \Controller ;
12
12
13
13
/**
14
14
* Class AboutController
Original file line number Diff line number Diff line change 8
8
namespace app \controllers ;
9
9
10
10
11
- use app \ core \Application ;
12
- use app \ core \Controller ;
13
- use app \ core \middlewares \AuthMiddleware ;
14
- use app \ core \Request ;
15
- use app \ core \Response ;
11
+ use thecodeholic \ phpmvc \Application ;
12
+ use thecodeholic \ phpmvc \Controller ;
13
+ use thecodeholic \ phpmvc \middlewares \AuthMiddleware ;
14
+ use thecodeholic \ phpmvc \Request ;
15
+ use thecodeholic \ phpmvc \Response ;
16
16
use app \models \LoginForm ;
17
17
use app \models \User ;
18
18
Original file line number Diff line number Diff line change 5
5
* Time: 8:21 AM
6
6
*/
7
7
8
- use app \ core \Application ;
8
+ use thecodeholic \ phpmvc \Application ;
9
9
10
10
require_once __DIR__ .'/vendor/autoload.php ' ;
11
11
$ dotenv = \Dotenv \Dotenv::createImmutable (__DIR__ );
Original file line number Diff line number Diff line change 8
8
class m0001_initial {
9
9
public function up ()
10
10
{
11
- $ db = \app \ core \Application::$ app ->db ;
11
+ $ db = \thecodeholic \ phpmvc \Application::$ app ->db ;
12
12
$ SQL = "CREATE TABLE users (
13
13
id INT AUTO_INCREMENT PRIMARY KEY,
14
14
email VARCHAR(255) NOT NULL,
@@ -22,7 +22,7 @@ public function up()
22
22
23
23
public function down ()
24
24
{
25
- $ db = \app \ core \Application::$ app ->db ;
25
+ $ db = \thecodeholic \ phpmvc \Application::$ app ->db ;
26
26
$ SQL = "DROP TABLE users; " ;
27
27
$ db ->pdo ->exec ($ SQL );
28
28
}
Original file line number Diff line number Diff line change 8
8
class m0002_add_password_column {
9
9
public function up ()
10
10
{
11
- $ db = \app \ core \Application::$ app ->db ;
11
+ $ db = \thecodeholic \ phpmvc \Application::$ app ->db ;
12
12
$ db ->pdo ->exec ("ALTER TABLE users ADD COLUMN password VARCHAR(512) NOT NULL " );
13
13
}
14
14
15
15
public function down ()
16
16
{
17
- $ db = \app \ core \Application::$ app ->db ;
17
+ $ db = \thecodeholic \ phpmvc \Application::$ app ->db ;
18
18
$ db ->pdo ->exec ("ALTER TABLE users ADD COLUMN password VARCHAR(512) NOT NULL " );
19
19
}
20
20
}
Original file line number Diff line number Diff line change 8
8
namespace app \models ;
9
9
10
10
11
- use app \ core \Application ;
12
- use app \ core \Model ;
11
+ use thecodeholic \ phpmvc \Application ;
12
+ use thecodeholic \ phpmvc \Model ;
13
13
14
14
/**
15
15
* Class LoginForm
Original file line number Diff line number Diff line change 8
8
namespace app \models ;
9
9
10
10
11
- use app \ core \DbModel ;
12
- use app \ core \UserModel ;
11
+ use thecodeholic \ phpmvc \DbModel ;
12
+ use thecodeholic \ phpmvc \UserModel ;
13
13
14
14
/**
15
15
* Class Register
Original file line number Diff line number Diff line change 8
8
9
9
use app \controllers \AboutController ;
10
10
use app \controllers \SiteController ;
11
- use app \ core \Application ;
11
+ use thecodeholic \ phpmvc \Application ;
12
12
13
13
require_once __DIR__ . '/../vendor/autoload.php ' ;
14
14
$ dotenv = \Dotenv \Dotenv::createImmutable (dirname (__DIR__ ));
Original file line number Diff line number Diff line change 31
31
<a class="nav-link" href="/about">About</a>
32
32
</li>
33
33
</ul>
34
- <?php use app \ core \Application ;
34
+ <?php use thecodeholic \ phpmvc \Application ;
35
35
36
36
if (Application::isGuest ()): ?>
37
37
<ul class="navbar-nav ml-auto">
You can’t perform that action at this time.
0 commit comments