路由
作业标题:0902作业
作业内容:1完成老师上课定义的路由内容
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| 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('admin/home/user',function (){
dd('查看所有会员');
})->name('admin.user.edit');
//会员修改路由
Route::get('admin/home/user/edit/{id}', function($id){
dd('显示会员修改页面');
})->name('admin.user.update');
//执行会员修改路由
Route::put('admin/home/user/update/{id}',function($id){
dd('执行'.$id.'这一条会员修改信息');
})->name('admin.user.update');
//删除会员
Route::delete('admin/home/user/delete/{id}',function($id){
dd('执行'.$id.'执行删除会员功能');
})->name('admin.user.stroy');
//添加会员
Route::post('admin/home/user/add',function(){
dd('接收会员信息 插入到数据库保存');
})->name('admin.user.add');