Skip to content

Instantly share code, notes, and snippets.

@rintoug
Last active December 19, 2017 17:28
Show Gist options
  • Save rintoug/0f6e38a68c988b617f2161f2aa76c247 to your computer and use it in GitHub Desktop.
Save rintoug/0f6e38a68c988b617f2161f2aa76c247 to your computer and use it in GitHub Desktop.
How to get Query Strings Value from a URL in Laravel
public function posts(Request $request) {
$id = $request->input('id'); //returns Ony Id value
$query = $request->all(); //Returns all inputs
//Another way to do it
$id = Input::get('id'); //returns Ony Id value
$query = Input::all(); //Returns all inputs
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment