| 123456789101112131415161718192021222324252627282930 |
- <?php
-
- use App\Http\Controllers\Api\EsgController;
- use App\Http\Controllers\Api\NewsController;
- use Illuminate\Support\Facades\Route;
-
- /*
- |--------------------------------------------------------------------------
- | API Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register API routes for your application. These
- | routes are loaded by the RouteServiceProvider and all of them will
- | be assigned to the "api" middleware group. Make something great!
- |
- */
-
- Route::prefix('{locale}')->where(['locale' => 'tw|en'])->group(function () {
- Route::prefix('news')->group(function () {
- Route::get('/', [NewsController::class, 'getTop']);
- Route::get('/list', [NewsController::class, 'list']);
- Route::get('/detail/{id}', [NewsController::class, 'detail'])->where('id', '[0-9]+');
- });
- Route::prefix('esg')->group(function () {
- Route::get('/', [EsgController::class, 'main']);
- Route::get('/{key}', [EsgController::class, 'esgContent']);
- });
- });
-
|