Searching Model Entries


Related Links

Introduction

Searching models in Pyro is the exact same as searching in Laravel using scout.

Basic Usage

You can search entry models directly off the model like this:

$results = PageModel::search('Welcome to Pyro')->get();

Paginating Results

Paginating search results is just the same as paginating any other query:

$results = PageModel::search('Welcome to Pyro')->paginate(15);

You can then loop over the results or render the pagination:

echo $results->render();