<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
#可以访问
//Route::get('index', function() {
//    return 'Hello Laravel';
//});
//可以访问 any匹配任何网络请求
/// //Route::any('index', function() {
//    return 'Hello Laravel';
//});
//同时匹配get  post
//Route::match(['get', 'post'], 'index', function () {
//    return 'Hello Laravel';
//});


Route::get('index/{id}', function($id) {
    return 'Hello Laravel'.$id;
});

Laravel 路由使用get post any match 与匹配一个路径路由_前端