0
我正在尝试通过id进行搜索。laravel路由和参数
<form method="post" action="{{action('[email protected]')}}">
<input type="text" name="id">
控制器
public function edit(Request $request)
{
$id=$request->id;
$ply = Player::find($id);
return view::make('player.edit')->with(compact('ply'));
}
路线
Route::get('/player/edit/{id}', '[email protected]');
edit.blade.php
<td>{{$ply[first_name]}}</td>
我越来越不确定的变量FIRST_NAME错误。
@ KenGraham.if其有用的标记答案被接受。 – iCoders
@ KenGraham.glade在这里它帮助你 – iCoders