Skip to content

Commit 5d6f529

Browse files
committed
Refactor(index): Integrated LionRoute initialization in index.php
1 parent 8fa9765 commit 5d6f529

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

index.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919
date_default_timezone_set($_ENV['SERVER_DEFAULT_TIME_ZONE']);
2020
// session_start();
2121

22-
include_once("routes/web.php");
22+
use LionRoute\Route;
23+
24+
Route::init();
25+
include_once("routes/web.php");
26+
Route::dispatch();

routes/web.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
<?php
22

33
use LionRoute\Route;
4-
54
use LionRequest\Response;
65
use Carbon\Carbon;
76

87
// || ------------------------------------------------------------------------------
98
// || Web Routes
109
// || Here is where you can register web routes for your application.
1110
// || ------------------------------------------------------------------------------
12-
Route::init();
1311

1412
Route::get('/', function() {
1513
return Response::success('Welcome to index! ' . Carbon::now());
16-
});
17-
18-
Route::dispatch();
14+
});

0 commit comments

Comments
 (0)