record($request); $this->authorize('view', $record); $this->authorize('create', $record::class); $copy = Duplicator::duplicate($record); return response()->json(['data' => [ 'type' => $this->content($request), 'id' => $copy->getKey(), 'title' => ContentTypes::title($copy), 'slug' => (object) $copy->getTranslations('slug'), ]], 201); } }