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

Commit e22a279

Browse files
committed
👽 applied leaf v2.5 changes
1 parent e653b4c commit e22a279

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

index.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,52 @@
3030
| Require all Leaf API's Files
3131
|
3232
*/
33-
require __DIR__. "/Config/bootstrap.php";
33+
require __DIR__ . "/Config/bootstrap.php";
3434

3535
/*
3636
|--------------------------------------------------------------------------
37-
| Initialise Leaf Core
37+
| Initialise Shortcut Functions
3838
|--------------------------------------------------------------------------
3939
|
40-
| Plant a seed, grow the stem and return Leaf🤷‍
40+
| Simple functions you can call from anywhere in your application.
41+
| This is not a core feature, you can remove it and your app would still
42+
| work fine.
4143
|
4244
*/
43-
$app = new Leaf\App;
45+
require __DIR__ . "/Config/functions.php";
4446

4547
/*
4648
|--------------------------------------------------------------------------
47-
| Default fix for CORS
49+
| Attach blade view
4850
|--------------------------------------------------------------------------
4951
|
50-
| This just prevents the connection client from throwing
51-
| CORS errors at you.
52+
| Since blade no longer ships with Leaf by default, we
53+
| can attach blade back to Leaf so you can use Leaf MVC
54+
| as you've always used it.
5255
|
5356
*/
54-
$app->evadeCors(false);
57+
Leaf\View::attach(\Leaf\Blade::class);
5558

5659
/*
5760
|--------------------------------------------------------------------------
58-
| Error Configuration
61+
| Initialise Leaf Core
5962
|--------------------------------------------------------------------------
6063
|
61-
| Show or hide errors for easy debugging
62-
| You might want to set this to false for production
64+
| Plant a seed, grow the stem and return Leaf🤷‍
6365
|
6466
*/
65-
Config\App::error_debug(true);
67+
$app = new Leaf\App(AppConfig());
6668

6769
/*
6870
|--------------------------------------------------------------------------
69-
| Initialise Shortcut Functions
71+
| Default fix for CORS
7072
|--------------------------------------------------------------------------
7173
|
72-
| Simple functions you can call from anywhere in your application.
73-
| This is not a core feature, you can remove it and your app would still
74-
| work fine.
74+
| This just prevents the connection client from throwing
75+
| CORS errors at you.
7576
|
7677
*/
77-
require __DIR__ . "/Config/functions.php";
78+
$app->evadeCors(false);
7879

7980
/*
8081
|--------------------------------------------------------------------------
@@ -84,8 +85,7 @@
8485
| Require app routes.
8586
|
8687
*/
87-
require __DIR__. "/App/Routes/index.php";
88-
88+
require __DIR__ . "/App/Routes/index.php";
8989

9090
/*
9191
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)