1/**
2 * Store a new blog post.
3 *
4 * @param \Illuminate\Http\Request $request
5 * @return \Illuminate\Http\Response
6 */
7public function store(Request $request)
8{
9 $validated = $request->validate([
10 'title' => 'required|unique:posts|max:255',
11 'body' => 'required',
12 ]);
13
14 // The blog post is valid...
15}