☕
hotCoffee
  • Introduction
  • ⚙️ GETTING STARTED
    • Installation
    • Resources & Credits
      • Argon Dashboard Free
      • Material Kit Free
      • Font Awesome
      • Laravel Packages
  • 🗂️ Modules
    • Dashboard
    • Menus
    • Articles
    • Info Pages
    • File Manager
    • Users
    • Roles
    • Settings
  • ⚒️ CUSTOMIZATION & LOGIC
    • Routing
    • Configuration
    • Adding Settings
    • Multilanguage
    • Helper Methods
    • Searching Models
    • Exporting
    • Traits
    • Extending Modules
    • Artisan Commands
Powered by GitBook
On this page
  1. ⚒️ CUSTOMIZATION & LOGIC

Searching Models

PreviousHelper MethodsNextExporting

Last updated 5 years ago

By default the search bar in admin will search for users, pages and articles. You can add more models in the searchables array in config/hotcoffee.php.

'searchables' => [
    'products' => [
        'label'     => 'Products', // Title of tab
        'fields'    => ['name', 'description'], // Fields to search in
        'index'     => ['id', 'name'], // Fields to index on search results
        'route'     => 'admin.products.edit' // Route name to edit or view model
    ],
],