Skip to content

Instantly share code, notes, and snippets.

@aryadiahmad4689
Last active December 14, 2020 12:49
Show Gist options
  • Save aryadiahmad4689/fa60e695289efd48cae40405fe8a0004 to your computer and use it in GitHub Desktop.
Save aryadiahmad4689/fa60e695289efd48cae40405fe8a0004 to your computer and use it in GitHub Desktop.
public function edit($id)
{
$customer = Customer::findOrFail($id);
return view('customer.edit',compact('customer'));
}
public function update(Request $request,$id)
{
$customer = Customer::findOrFail($id);
$customer->name = $request->nama;
$customer->email = $request->email;
$customer->save();
return redirect()->route('customer.index');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment