web.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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('/app', '/app/pcdl/index.php');
  17. Route::redirect('/app/pcdl', '/app/pcdl/index.php');
  18. Route::get('/', [PageIndexController::class,'index']);
  19. Route::get('/api/sentence/progress/image', [SentenceInfoController::class,'showprogress']);
  20. Route::get('/api/sentence/progress/daily/image', [SentenceInfoController::class,'showprogressdaily']);
  21. Route::get('/wbwanalyses', [WbwAnalysisController::class,'index']);
  22. Route::get('/export/wbw', function (){
  23. return view('export_wbw',['sentences' => []]);
  24. });
  25. Route::get('/privacy/{file}', function ($file){
  26. $content = file_get_contents(base_path("/documents/mobile/privacy/{$file}.md"));
  27. return view('privacy',['content' => $content]);
  28. });
  29. Route::redirect('/privacy', '/privacy/index');