【发布时间】:2018-08-16 02:59:34
【问题描述】:
有没有一种方法可以生成 id 配置文件 id。例如,我想要 localhost/lary/quickstart/public/ 而不是 localhost/lary/quickstart/public/profile/35/edit profile/habb778/edit这是我的代码
public function edit($companyname)
{
$pro=Profile::find($companyname);
return view('layouts.profileedit')->with('pro',$pro);
}
<a href="{{url('profileedit',$use->companyname)}}" style="color:#F88B22;"><span class="glyphicon glyphicon-pencil"></span></a>
路线:
Route::resource('profile','ProfileController',['except'=>'edit']);
Route::get('profileedit/{companyname}','ProfileController@edit');
【问题讨论】: