original_string: public function image() {
  		if (Request::hasFile('image') && Request::has('table_name') && Request::has('field_name')) {
  			return json_encode(self::saveImage(
  				Request::input('table_name'), 
  				Request::input('field_name'), 
  				Request::file('image'),
  				null,
  				Request::file('image')->getClientOriginalExtension()
  			));
  		} elseif (!Request::hasFile('image')) {
  			return 'no image';
  		} elseif (!Request::hasFile('table_name')) {
  			return 'no table_name';
  		} elseif (!Request::hasFile('field_name')) {
  			return 'no field_name';
  		}
  	}
code: public function image() {
  		if (Request::hasFile('image') && Request::has('table_name') && Request::has('field_name')) {
  			return json_encode(self::saveImage(
  				Request::input('table_name'), 
  				Request::input('field_name'), 
  				Request::file('image'),
  				null,
  				Request::file('image')->getClientOriginalExtension()
  			));
  		} elseif (!Request::hasFile('image')) {
  			return 'no image';
  		} elseif (!Request::hasFile('table_name')) {
  			return 'no table_name';
  		} elseif (!Request::hasFile('field_name')) {
  			return 'no field_name';
  		}
  	}
code_tokens: public function image ( ) { if ( Request :: hasFile ( 'image' ) && Request :: has ( 'table_name' ) && Request :: has ( 'field_name' ) ) { return json_encode ( self :: saveImage ( Request :: input ( 'table_name' ) , Request :: input ( 'field_name' ) , Request :: file ( 'image' ) , null , Request :: file ( 'image' ) -> getClientOriginalExtension ( ) ) ) ; } elseif ( ! Request :: hasFile ( 'image' ) ) { return 'no image' ; } elseif ( ! Request :: hasFile ( 'table_name' ) ) { return 'no table_name' ; } elseif ( ! Request :: hasFile ( 'field_name' ) ) { return 'no field_name' ; } }
docstring: handle image upload route
docstring_tokens: handle image upload route