Last active
December 19, 2017 17:28
-
-
Save rintoug/0f6e38a68c988b617f2161f2aa76c247 to your computer and use it in GitHub Desktop.
How to get Query Strings Value from a URL in Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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