{!! Form::text('agentName',null,['class'=>'form-control']) !!}
Shouldn't agent_name
should be agentName
?
Yes its correct but now my route is gone wrong when update it always gone 404. here is my route
###route
Route::controllers([
'home' => 'HomeController',
'validated/agent'=>'AgentController',
'/' => 'WelcomeController',
]);
###contraoller
public function postEditAgent($id, EditAgentRequest $request)
{
$agent = Agents::findOrFail($id);
$agent->agentName = $request->get('agentName');
$agent->save();
return redirect('validated/agent/')->with(['edited' => 'The agent was updated.']);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community