src/Transformations/Serialization/ApiDataSerializer.php
public function applyRequestQueryParams(AbstractPaginator $paginator)
	{
		// Pass in any additional query variables
		foreach (
			array_except(
				Request::instance()->query->all(), [
					self::PAGINATION_CURRENT_PAGE,
					self::PAGINATION_PER_PAGE
				]
			) as $key => $value
		) {
			$paginator->addQuery($key, $value);
		}
		// Add our "per page" pagination parameter to the constructed URLs
		$paginator->addQuery(self::PAGINATION_PER_PAGE, $paginator->perPage());
	}
public function applyRequestQueryParams(AbstractPaginator $paginator)
	{
		// Pass in any additional query variables
		foreach (
			array_except(
				Request::instance()->query->all(), [
					self::PAGINATION_CURRENT_PAGE,
					self::PAGINATION_PER_PAGE
				]
			) as $key => $value
		) {
			$paginator->addQuery($key, $value);
		}
		// Add our "per page" pagination parameter to the constructed URLs
		$paginator->addQuery(self::PAGINATION_PER_PAGE, $paginator->perPage());
	}
public function applyRequestQueryParams ( AbstractPaginator $ paginator ) { // Pass in any additional query variables foreach ( array_except ( Request :: instance ( ) -> query -> all ( ) , [ self :: PAGINATION_CURRENT_PAGE , self :: PAGINATION_PER_PAGE ] ) as $ key => $ value ) { $ paginator -> addQuery ( $ key , $ value ) ; } // Add our "per page" pagination parameter to the constructed URLs $ paginator -> addQuery ( self :: PAGINATION_PER_PAGE , $ paginator -> perPage ( ) ) ; }
Find all the query parameters passed in the request and apply them to the paginator so we can build
a useful URL.

@param \Illuminate\Pagination\AbstractPaginator $paginator
Find all the query parameters passed in the request and apply them to the paginator so we can build a useful URL .