У меня есть отношения с детьми. Мне нужно, чтобы он вернулся с ответом, он будет пустым, я знаю, но мне это нужно
public function store(Category $category, Path $path,$level,Task $task,Request $request)
{
\Auth::loginUsingId(1);
$this->validate($request ,[
'body' =>'required|max:5000',
]);
$comment = $task->comments()->make([
'body' => $request->body
]);
$request->user()->comments()->save($comment);
return new CommentResource($comment);
}