O'Reilly logo

CakePHP 2 Application Cookbook by Jorge González, James Watts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Search plugin

Instead of manually doing the implementation of the searching and filtering in your models, you may be interested in using the CakeDC Search plugin, a powerful and reusable way to implement database search in your application.

In this recipe, we'll see how easy it can be to include the plugin within an application and add some search power on the fly.

Getting ready

First, we'll need to download and install the CakeDC Search plugin. We'll use git modules for the setup, but if you're not using git, you can simply download the ZIP file and place the contents of the plugin in a folder named app/Plugin/Search/, as shown in the following command:

$ git submodule add git://github.com/CakeDC/search.git app/Plugin/Search

After that, load ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required