web.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use App\Http\Controllers\SentenceInfoController;
  4. use App\Http\Controllers\WbwAnalysisController;
  5. use App\Http\Controllers\PageIndexController;
  6. /*
  7. |--------------------------------------------------------------------------
  8. | Web Routes
  9. |--------------------------------------------------------------------------
  10. |
  11. | Here is where you can register web routes for your application. These
  12. | routes are loaded by the RouteServiceProvider within a group which
  13. | contains the "web" middleware group. Now create something great!
  14. |
  15. */
  16. Route::redirect('/', '/pcd/community/list');
  17. Route::redirect('/app', '/app/pcdl/index.php');
  18. Route::redirect('/app/pcdl', '/app/pcdl/index.php');
  19. Route::get('/', [PageIndexController::class,'index']);
  20. Route::get('/api/sentence/progress/image', [SentenceInfoController::class,'showprogress']);
  21. Route::get('/api/sentence/progress/daily/image', [SentenceInfoController::class,'showprogressdaily']);
  22. Route::get('/wbwanalyses', [WbwAnalysisController::class,'index']);
  23. Route::get('/export/wbw', function (){
  24. return view('export_wbw',['sentences' => []]);
  25. });
  26. Route::get('/privacy/{file}', function ($file){
  27. $content = file_get_contents(base_path("/documents/mobile/privacy/{$file}.md"));
  28. return view('privacy',['content' => $content]);
  29. });
  30. Route::redirect('/privacy', '/privacy/index');