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 February 24, 2024 13:40
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