where('slug', $slug) ->first(); if (! $issue) { throw new \InvalidArgumentException("Issue not found: {$slug}"); } return IssueComment::create([ 'issue_id' => $issue->id, 'author' => $author, 'body' => $body, 'metadata' => $metadata, ]); } }