i just trying to crud system. for that into controller store function my code is
public function store(Request $request)
{
Article::create([
'user_id' => auth()->id(),
'content' => $request->content,
'live' => (boolean)$request->live,
'post_on' => $request->post_on
]);
return redirect('/articles');
}
it's enough to store data, but when i want to edit article & save again then what will be my edit function code? i have no idea. i trying same code into edit function & it create new article not update. so what will be right code for edit function? thanks