Showing 10 of 1,280 results.

Getting an Input Element's Value | Laravel 4: Getting User Input

Inside of our route, we can use the get method on the Input facade to get our input, and it really is as easy as doing this: 1 <?php 2 3 Route :: post ( ' user/create ' , function ( ) 4 { 5 // Get the user's first and last name. 6 $ firstName =...

Specifying a Default Value | Laravel 4: Getting User Input

When we use the get() method, we pass the name of the field we want the value of as the first argument. We can optionally use a second argument to specify a default value if one has not been set: 1 <?php 2 3 Route :: post ( ' user/create ' ,...

I'm Getting The Wrong Data? | Laravel 4: Getting User Input

So we know how to get the input from the user, but how do we handle the occasional situation where we have ambiguous input? For example say we have a form field named name set to John Doe for a user's name using a POST request. In addition we also...

Filter Search