Here is my model:
namespace App;
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;
class Film extends Model
{
use Searchable;
Here is my route query:
use Illuminate\Http\Request;
Route::get('/search', function (Request $request) {
$films = App\Film::search($request->search)->get();
return view('pages.result')->with('page_title', "Results of search")->with('films', $films);
});
Here is my view:
<form action="/search" method="GET">
<div class="form-group">
<input type="text" id="autosearch" name="search" class="form-control search"
placeholder="Search for films">
</div>
</form>
Here is my result of any query to search: []
My table imported to algolia, with command "import", its have 6733 writes there. My env and scout files are corretctly, my new publication from site are indexing in algolia. but i dont to understand how to fix searchin, why it is not find information??
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2G4LZ1Z
via IFTTT
Aucun commentaire:
Enregistrer un commentaire