Route::get('/',function(){
return view ['welcome'];
});
Route::get('/user',function(){
return "hello world!";
});
Route::redirect('/user1','user');
Route::get('/user/{id?}',function($id=1){
dd($id);
})->where('id','[0-9]{2}[0-9|x]');
Route::group(['post','get'],function(){
Route::get('user',function(){
return 'roote by get';
});
Route::post('user',funtion(){
return 'route by post';
});
});
laravel1
最新推荐文章于 2024-08-27 16:29:55 发布