laravel资源路由
1 <?php 2 3 4 namespace App\Http\Controllers; 5 6 7 use http\Env\Request; 8 9 class resourceController 10 { 11 public function index(){ // 12 dump("index:展示所有资源"); 13 } 14 public function store(Request $request){ 15 dump("store:更新/写入,整理入库"); 16 } 17 public function show($id){ 18 dump("show:展示单个数据"); 19 } 20 public function update(){ 21 dump("update:更新数据"); 22 } 23 public function destroy($id){ 24 dump("destroy:删除资源"); 25 } 26 }
每天坚持,终会抵达!