/**
  * Store a newly artical under a specific category.
  *
  * @param  request(POST)  $request - request data
  * @param  int  $catId - id of a category
  * @return Response
  */
 public function store(CreateNewsRequest $request, $catId)
 {
     // find by $catId
     $category = Category::find($catId);
     // if no category found
     if (!$category) {
         // set response as an error
         return response()->json(['message' => 'The category could not be found', 'code' => 404], 404);
     }
     // request look for specific post data
     $values = $request->only(['title', 'content', 'url', 'image', 'likes', 'dislikes']);
     // create the artical with the relationship
     $category->news()->create($values);
     // set response as json with data
     return response()->json(['message' => "News article created and added to category id '{$catId}' successfully", 'code' => 201], 201);
 }