laravel.url
2024-09-25 17:27:20
通过php artisan route:list 可以看到当前应用的路由情况,
在前端页面中如果要修改一个实体,需要用到实体.update,涉及的uri为实体/{实体},所用的http方法为put.
在表单中action可以有两种写法
{{url('workplace/'.$workplaceid)}} 或者 {{__('workplace/'.$workplaceid)}}
{{route('workplace.update',['id'=>$workplaceid])}}
uri的表现形式可以通过url函数和route函数相互转换,一些例子
route('maintainer.update',['id'=>$m['id']])
等价于
url('/maintainer/'.$m['id'])
{{ url('maintainer/'.$m['id'].'/edit') }}
等价于
{{route('maintainer.edit',['id'=>$m['id']])}}
最新文章
- 揭秘JavaScript中谜一样的this
- grunt 执行
- ios多线程和进程的区别(转载)
- HotSpot算法实现
- wpa_supplicant 和 802.11g WPA 认证的配置
- 【C#多线程】C#多线程 Thread 开发基础
- GitHub以及Git学习 持续编辑学习中
- python打造一个Mysql数字类型注入脚本(1)
- session效率
- Shell 自动安装 JDK
- python 对excel操作用法详解
- what is API
- TypeScript 版本相关
- PAT 1003 Emergency
- [LeetCode&;Python] Problem 383. Ransom Note
- Go学习笔记 - 关于Java、Python、Go编程思想的不同
- HttpClient使用
- swift学习之-- UIAlertViewController -alert
- Linux nl --让输出的文件内容自动加上行号
- C#学习笔记-代理模式
热门文章
- Maven项目-端口被占用java.net.BindException: Address already in use: JVM_Bind <;null>;:8080解决方法
- package.json中一些配置项的含义
- IE 样式属性前后缀兼容写法略统计
- 一文解读CDN (转)
- jquery的优点
- 【剑指Offer面试编程题】题目1512:用两个栈实现队列--九度OJ
- P1250 种树 题解
- IDEA中如何部署tomcat
- vue - 封装input
- 引用类型--Date类型