Skip to content

Commit 978e755

Browse files
committed
update readme.md
1 parent a970843 commit 978e755

File tree

5 files changed

+11
-56
lines changed

5 files changed

+11
-56
lines changed

public/banner.png

6.66 KB
Loading

src/controllers/GenshinController.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/controllers/HomeController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
namespace src\controllers;
33
use \core\Auth;
44
use \core\Controller;
5+
use \src\models\Posts;
56

67
class HomeController extends Controller {
78
public function index() {
89
$status = Auth::checkout('status');
9-
$status["APIs"] = array("genshinimpact");
10+
$status["data"] = Posts::get();
1011
echo json_encode($status);
1112
}
1213
}

src/models/Posts.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace src\models;
3+
use \core\Database;
4+
5+
class Posts {
6+
public static function get() {
7+
return Database::public('posts');
8+
}
9+
}

src/routes.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@
44
$router = new Router();
55

66
$router->get('/', 'HomeController@index');
7-
8-
//ROUTERS FOR GENSHINIMPACT API/
9-
$api_Name = 'genshinimpact';
10-
$router->get('/'.$api_Name, 'GenshinController@index');
11-
$router->get('/'.$api_Name.'/characters', 'GenshinController@characters');
12-
$router->get('/'.$api_Name.'/characters/{id}', 'GenshinController@characterId');

0 commit comments

Comments
 (0)