public function removeTrailingSlash()
	{
		$pathInfo = $this->app['request']->getPathInfo();
		$requestUri = $this->app['request']->getRequestUri();

		$url = str_replace($pathInfo, rtrim($pathInfo, ' /'), $requestUri);

		return $this->redirect($url, Response::HTTP_MOVED_PERMANENTLY);
	}
public function removeTrailingSlash()
	{
		$pathInfo = $this->app['request']->getPathInfo();
		$requestUri = $this->app['request']->getRequestUri();

		$url = str_replace($pathInfo, rtrim($pathInfo, ' /'), $requestUri);

		return $this->redirect($url, Response::HTTP_MOVED_PERMANENTLY);
	}
public function removeTrailingSlash ( ) { $ pathInfo = $ this -> app [ 'request' ] -> getPathInfo ( ) ; $ requestUri = $ this -> app [ 'request' ] -> getRequestUri ( ) ; $ url = str_replace ( $ pathInfo , rtrim ( $ pathInfo , ' /' ) , $ requestUri ) ; return $ this -> redirect ( $ url , Response :: HTTP_MOVED_PERMANENTLY ) ; }
Remove trailing slash and redirect permanent

@return \Symfony\Component\HttpFoundation\RedirectResponse
Remove trailing slash and redirect permanent