Support the ongoing development of Laravel.io →
Input Database Forms
Last updated 2 years ago.
0
{!! Form::text('agentName',null,['class'=>'form-control']) !!}

Shouldn't agent_name should be agentName?

Last updated 9 years ago.
0

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.']);
    }
0

Sign in to participate in this thread!

Eventy

Your banner here too?

wipflash wipflash Joined 7 Sep 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.