diff --git a/app/Http/Controllers/Api/GithubController.php b/app/Http/Controllers/Api/GithubController.php index cbde794..79794b6 100755 --- a/app/Http/Controllers/Api/GithubController.php +++ b/app/Http/Controllers/Api/GithubController.php @@ -9,7 +9,7 @@ use App\Models\ArticleList as Article; class GithubController extends Controller { - public function todayUpd () + public function todayUpd() { $sCode = date("Ymd"); @@ -20,4 +20,14 @@ class GithubController extends Controller } + public function getLast() + { +// $sCode = date("Ymd"); + + $aToday = Article::orderBy("id", "desc")->first()->toArray(); + + echo json_encode($aToday); + + } + } diff --git a/routes/web.php b/routes/web.php index a6a600d..d9f64da 100755 --- a/routes/web.php +++ b/routes/web.php @@ -40,3 +40,4 @@ Route::get('/helper/like/get/{id}', [HelperController::class, 'likeGet']); // Route::get('/sakai/tool', [SakaiController::class, 'tool']); Route::get('/api/github/todayupd', [GithubController::class, 'todayUpd']); +Route::get('/api/github/getlast', [GithubController::class, 'getLast']);