Skip to content

Instantly share code, notes, and snippets.

View vtalbot's full-sized avatar

Vincent Talbot vtalbot

View GitHub Profile
// inside boot()
resolve(EngineManager::class)->extend('elasticsearch', function () {
return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index'));
});
@JeffreyWay
JeffreyWay / PjaxMiddleware.php
Last active November 6, 2024 14:26
Laravel middleware for working with pjax.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware