Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit ccf64f7

Browse files
committed
feat: update core file to use new modules
1 parent 6f2a7d3 commit ccf64f7

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

public/index.php

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,32 +87,24 @@
8787
|--------------------------------------------------------------------------
8888
|
8989
| Sync Leaf Db with ORM and connect to the database
90-
| This allows you to use Leaf Db without having to initialize it
91-
| in your controllers.
90+
| This allows you to use Leaf Db and Leaf Auth without
91+
| having to initialize them in your controllers.
9292
|
93-
| This is optional, you can still use your own Leaf Db connections in
94-
| your controllers. If you want to opt into this,
95-
| just uncomment the line below.
93+
| If you want to use a different connection from those
94+
| used in, your models, you can remove the line below and
95+
| add your own connection with:
96+
| db()->connect(...)
9697
|
98+
| **Uncomment the line below to use Leaf Db or Auth**
9799
*/
98-
// Leaf\Database::syncLeafDb();
100+
// \Leaf\Database::initDb();
99101

100102
/*
101103
|--------------------------------------------------------------------------
102-
| Route Config
104+
| Run your Leaf MVC application
103105
|--------------------------------------------------------------------------
104106
|
105-
| Require app routes.
107+
| This line brings in all your routes and starts your application
106108
|
107109
*/
108-
require dirname(__DIR__) . '/app/routes/index.php';
109-
110-
/*
111-
|--------------------------------------------------------------------------
112-
| Run Leaf Application
113-
|--------------------------------------------------------------------------
114-
|
115-
| Require app routes
116-
|
117-
*/
118-
app()->run();
110+
\Leaf\Core::runApplication();

0 commit comments

Comments
 (0)