Created
May 6, 2018 12:22
-
-
Save raymond1988/9d1c188a25bb4d2617335ba8ac4ef97e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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