我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Symfony路由按ID查找,但url显示名称

I am working with Symfony2 project and there are routings like
pattern: /specialoffers/{id}/{name}.
In my web it shows like /specialoffers/15/offername. But i want to see only /specialoffers/offername. I need in controller the id of specialoffers to find it in my DB. How can i remake my router or controller action to show nice URLs?

近期文章

  • 升级扩展后,Magento站点无法正常工作
  • Ajax没有显示倒计时的价值
  • 我可以从静态数组中填充一组Eloquent模型吗?
  • 开发环境的Nginx站点配置
  • 优化查询,php mysql
  • 如何将多个格式的多维数组合并为一个数组,并使用PHP进行加权?
  • 如何从我的共享主机向AWS EC2上的函数发送一个url数组?
  • 搜索日期不起作用
  • 尽管将整个表传递给视图,但不显示特定列的值。
  • Webmatrix session_destroy()
  • 0 cron-job中未指定的响应代码
  • 关于pcl中ransac算法识别直线时报错error segmenting the model! no solution found
  • 从php数组创建json数组
  • php SOAP对象间歇性错误
  • PHP投票系统重定向不起作用
  • 将流量发送到另一个网站
  • 使用HTML表单和MySQL数据库在PHP中的注释部分
  • PDO fetchAll和json_encode忽略查询的数据类型
  • 如何在PHP中将多维数组显示到表中?
  • 如何在yii2中使用多语言? [重复]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华