Level 35
To get the referer URL you can use: $_SERVER['HTTP_REFERER'], or the Laravel way: URL::previous();.
And you can use parse_url() to grab the query string:
$parsedUrl = parse_url(URL::previous());
$parsedUrl['post']; // www.example.com
$parsedUrl['path']; // /posts
$parsedUrl['query']; // param=val¶m2=val
And you can get an array of params $output with value using parse_str().
parse_str($parsedUrl['query'], $output);