【发布时间】:2016-12-28 12:04:39
【问题描述】:
我有下一行
<h5><a href="{{ url('rent', $brands->brand_name.'-'.$cars->model.'-'.$cars->transmiter ) }}"
target="_blank">{{$brands->brand_name}}/{{$cars->model}}</a></h5>
当按下这样的链接时我得到了网址
http://localhost/mySite/rent/Citroen-C4-manual
如何使用来自 url 的数据创建新的刀片页面(Citroen-C4-manual)。我现在不知道如何获取这些数据,因为我没有 id,也不需要在 url 中查看 id?
我在 routes.php 中使用
Route::resource('rent', 'myController');
在 myController 我有
class myControllerextends Controller{
public function index(){
return view('data.car');
}
public function show($id){
view('data.car');
}
有什么想法吗?
【问题讨论】: