From 69de02c4cf81fab398f8558aa7e5588705ba93ff Mon Sep 17 00:00:00 2001 From: Hossain Mohammad Shahidullah Jaber <55241455+JaberWiki@users.noreply.github.com> Date: Thu, 10 Aug 2023 21:52:03 +0600 Subject: [PATCH] Update typo in README.md Coz It's retrieving the first data row, so it should be in singular form. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b9fbc32..de30b7d 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,11 @@ public function store(Request $request) $ticket = $user->tickets() ->create($request->validated()); - $categories = Category::first(); - $labels = Label::first(); + $category = Category::first(); + $label = Label::first(); - $ticket->attachCategories($categories); - $ticket->attachLabels($labels); + $ticket->attachCategories($category); + $ticket->attachLabels($label); // or you can create the categories & the tickets directly by: // $ticket->categories()->create(...);