public function store(CategoryRequest $request, $id = null)
    {
        $category = $this->repository->create($request, $id);

        if ($category) {
            $message = "Successfully created $this->resource";

            return redirect()->route($this->routes['index'])->withSuccess($message);
        } else {
            $message = "There was an issue creating a $this->resource. Please try again.";

            return redirect()->route($this->routes['create'], $id)->withErrors($message);
        }
    }