datalumo / laravel
Laravel integration for Datalumo
0.1.0
2026-07-31 05:00 UTC
Requires
- php: ^8.2
- datalumo/php: ^0.1.0
- illuminate/bus: ^11.0|^12.0|^13.0
- illuminate/console: ^11.0|^12.0|^13.0
- illuminate/contracts: ^11.0|^12.0|^13.0
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/queue: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- illuminate/view: ^11.0|^12.0|^13.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.1
This package is auto-updated.
Last update: 2026-07-31 05:00:34 UTC
README
Laravel package for Datalumo. Sync Eloquent models, search them, and embed widgets.
Built on datalumo/php.
Install
composer require datalumo/laravel php artisan vendor:publish --tag=datalumo-config
Requires PHP 8.2+ and Laravel 11, 12, or 13. Laravel 13 requires PHP 8.3+.
Configure
DATALUMO_BASE_URL=https://datalumo.app DATALUMO_ORG=your-org-public-id DATALUMO_TOKEN=your-api-token DATALUMO_SOURCE=docs DATALUMO_SEARCH_WIDGET={org-public-id}/{search-widget-id} DATALUMO_CHAT_WIDGET={org-public-id}/{chat-widget-id}
DATALUMO_ORG is the organisation public id, not the slug.
Search and chat are separate widgets in Datalumo (different types). Set both if you use both embeds. You can still pass a widget prop to a component to override the default.
Optional check:
php artisan datalumo:install
Make a model searchable
use Datalumo\Laravel\Searchable; use Illuminate\Database\Eloquent\Model; class Article extends Model { use Searchable; public function toDatalumoArray(): array { return [ 'external_id' => (string) $this->getKey(), 'name' => $this->title, 'content' => $this->body, 'content_mime' => 'text/markdown', 'source_url' => route('articles.show', $this), ]; } }
Models sync on save and delete (queued by default).
Import existing rows:
php artisan datalumo:import "App\Models\Article"
Search
Server-side search uses DATALUMO_SEARCH_WIDGET:
$articles = Article::datalumoSearch('how to deploy')->get();
Embeds
<x-datalumo::search /> <x-datalumo::chat /> {{-- Override when needed --}} <x-datalumo::search widget="org/other-search-widget" /> <x-datalumo::chat widget="org/other-chat-widget" /> @stack('datalumo-scripts')