Showing 7 of 1,216 result(s)
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:
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: What the above code will do is first look to see if...
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...
We need to change the $parameters declaration and make it so it is just an empty array. Let's also store the page name in its own variable, since we will use it later. We do not need to change the code that builds the parameters array from the...
No we need to create a variable to hold our current page URL: And then we can format our page URL to look pretty: What the above code will do is take the current page URL, for example http://localhost:8000/users , followed by a forward slash, the...
We are going to need to resolve some things out of the IoC, so make sure to use the Illuminate\Support\Facades\App facade. In our PrettyPaginator class, add the following function: its kind of scary, but I'll explain it. When we call the...
Since we are trying to get everything to work nicely with Kint, we should probably have Kint required in our project. Add this to your composer.json file (either in your require or require-dev section. I put mine in the require-dev section):