An open API service indexing awesome lists of open source software.

https://github.com/dillingham/searchable

basic search functioality
https://github.com/dillingham/searchable

laravel php

Last synced: 3 months ago
JSON representation

basic search functioality

Awesome Lists containing this project

README

          

# Searchable
```
composer require dillingham/searchable
```

- add `Searchable` to model(s)
- add `$table->longText('search');` to migration
- add `Model::searchIndex()` to migration
- add `->appendSearch($content)` to observer

example

```php
// on post save
$post->appendSearch($post->content);

// on comment save
$comment->post->appendSearch($comment->body);
```