@@ -18,7 +18,7 @@ |
||
| 18 | 18 | // ... |
| 19 | 19 | |
| 20 | 20 | // get data to save in an associative array using $request->only() |
| 21 | - $data = $request->only(['title', 'description']); |
|
| 21 | + $data = $request->only([ 'title', 'description' ]); |
|
| 22 | 22 | |
| 23 | 23 | // save post and assign return value of created post to $post array |
| 24 | 24 | $post = Post::create($data); |