web.php 985 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use App\Http\Controllers\SentenceInfoController;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Web Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register web routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | contains the "web" middleware group. Now create something great!
  12. |
  13. */
  14. Route::redirect('/', '/app/pcdl/index.php');
  15. Route::redirect('/app', '/app/pcdl/index.php');
  16. Route::redirect('/app/pcdl', '/app/pcdl/index.php');
  17. Route::get('/user/{id}', function ($id) {
  18. return 'User '.$id;
  19. });
  20. Route::get('/home/{name}', function ($name) {
  21. return view('home', ['name' => $name]);
  22. });
  23. Route::get('/api/sentence/progress/image', [SentenceInfoController::class,'showprogress']);
  24. Route::get('/api/sentence/progress/daily/image', [SentenceInfoController::class,'showprogressdaily']);