Skip to content

Instantly share code, notes, and snippets.

@raymond1988
Created May 6, 2018 12:22
Show Gist options
  • Save raymond1988/9d1c188a25bb4d2617335ba8ac4ef97e to your computer and use it in GitHub Desktop.
Save raymond1988/9d1c188a25bb4d2617335ba8ac4ef97e to your computer and use it in GitHub Desktop.
public function update(UpdateBlogPostRequest $request, Post $post) {
//update post
DB::table('posts')
->where('id', $post->id)
->update([
'title' => $request->input('title'),
'description' => $request->input('description'),
'content' => $request->input('content')]
);
//redirect user or show message
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment