Laravel 5 simple search box using GET method

Laravel 5 simple search box using GET method

SHARE
Second Step: The Controller

In your Controller’s index() function we will get the additional parameter in the URL.

We will get the param by assigning \Request::get() method to a variable. After which, we search through our model, the example uses LIKE operator but you can use any of the operators you want. If record found, then display results back to our view.

That’s it, pretty simple.

2 / 2Next

SHARE
Programmer, Database Designer and Administrator for Web Application. Who loves to read and write interesting topics.