original_string: public function uploadImage(ImageUploadRequest $request)
      {
          $image_name = $this->resizeAndSaveImage($request->file('upload'));
          $path = config('app.url').'/uploads/posts/'.$image_name;
          $func = $request->get('CKEditorFuncNum');
          $result = "<script>window.parent.CKEDITOR.tools.callFunction($func, '$path', 'Image has been uploaded')</script>";
  
          return $result;
      }
code: public function uploadImage(ImageUploadRequest $request)
      {
          $image_name = $this->resizeAndSaveImage($request->file('upload'));
          $path = config('app.url').'/uploads/posts/'.$image_name;
          $func = $request->get('CKEditorFuncNum');
          $result = "<script>window.parent.CKEDITOR.tools.callFunction($func, '$path', 'Image has been uploaded')</script>";
  
          return $result;
      }
code_tokens: public function uploadImage ( ImageUploadRequest $ request ) { $ image_name = $ this -> resizeAndSaveImage ( $ request -> file ( 'upload' ) ) ; $ path = config ( 'app.url' ) . '/uploads/posts/' . $ image_name ; $ func = $ request -> get ( 'CKEditorFuncNum' ) ; $ result = "<script>window.parent.CKEDITOR.tools.callFunction($func, '$path', 'Image has been uploaded')</script>" ; return $ result ; }
docstring: Function to upload images using
  the SKEditor
  
  note: no CSRF protection on the route that is
  calling this function because we are using the
  CKEditor within an iframe :(
  
  @param \jorenvanhocht\Blogify\Requests\ImageUploadRequest $request
  @return string
docstring_tokens: Function to upload images using the SKEditor