- What is laravel-enso/charts and what does it do?
- Laravel Enso Charts is a leaf package in the Laravel Enso ecosystem that pairs a PHP-side data builder with a VueJS wrapper around Chart.js. You define chart types, labels, datasets, and options in PHP, and the frontend component renders them as interactive charts. It is designed for Enso's opinionated admin-panel stack rather than as a generic, framework-agnostic charting library.
- Do I need Laravel Enso to use laravel-enso/charts, or does it work in any Laravel app?
- It is built for applications already running Laravel Enso's core packages, Vue 2 SPA shell, and asset pipeline. Installing it in a plain Laravel app is possible in theory but pulls in Enso contracts and build conventions for what is essentially one widget family. For a generic Laravel or Inertia/Vue 3 project, the trade-off is usually not worth it.
- How do I install laravel-enso/charts with Composer?
- Install it with Composer alongside the Enso core packages your application already uses, then register the service provider following Enso's package conventions. On the frontend, the Vue component must be wired into the existing Enso asset pipeline. Confirm the tagged release's composer.json requirements before installing, since Enso packages are versioned in lockstep with Enso core.
- Which Laravel, PHP, and Vue versions does laravel-enso/charts support?
- The package targets the Laravel and PHP ranges declared in its composer.json and expects the Vue 2 frontend stack that Enso ships with. Because Enso packages track Enso core releases, the safest approach is to match the charts version to the Enso core version already in your app. Check the tagged release's composer.json and Enso documentation for the exact supported matrix before committing.
- How does the PHP data builder work for creating chart datasets?
- The backend builder lets you compose chart configuration server-side: chart type, labels, datasets, and Chart.js options are assembled in PHP and handed to the Vue component. This keeps query logic, Eloquent scopes, authorization, and caching behind the chart rather than scattered in frontend code. The useful part of the package is this server-composed config pattern, which is small and easy to reason about.
- Is laravel-enso/charts compatible with Vue 3, Inertia, or Livewire frontends?
- No, not natively. Enso is built on a Vue 2 SPA shell, and Vue 2 reached end-of-life in December 2023, so any long-lived product inherits that obsolescence clock. A team on Vue 3 or Inertia would spend more effort decoupling the package from Enso than writing a thin Chart.js wrapper themselves. Treat the package as a reference implementation in that scenario.
- What are good alternatives to laravel-enso/charts for adding Chart.js charts to Laravel?
- If you are not on Enso, the common path is to port the server-side data builder idea into a small controller or DTO in your own codebase and render with a maintained Chart.js Vue wrapper such as vue-chartjs. That preserves the valuable part, server-composed chart configuration, without the Enso coupling. Charts that need deeper customization may be better served by passing JSON config straight to a Chart.js instance.
- Does laravel-enso/charts support real-time updates, streaming large datasets, or chart export?
- The package is a thin Chart.js wrapper plus a data builder, so its functional surface is small and well understood. Real-time streaming, CSV or image export, and very large dataset handling are not features it advertises, and you would need to build them yourself. Confirm your specific requirements against the package source before assuming coverage.
- How should I test charts built with laravel-enso/charts?
- Because chart configuration is composed in PHP, the data builder output can be asserted in standard Laravel feature or unit tests without rendering the frontend. Verify chart type, labels, dataset values, and options as structured data, and mock any underlying queries. Frontend rendering is best validated with a smoke test in the Enso SPA rather than pixel-level assertions.
- Is laravel-enso/charts actively maintained and safe for production use?
- Maintenance follows the Enso maintainers' priorities, not general adoption; the package has a small star count and a small contributor footprint, so bug response and breaking-change policy are driven by Enso's roadmap. Scope risk is low because the API surface is tiny, but ecosystem and frontend obsolescence risks are high given the Vue 2 foundation. It is production-safe if you are already committed to Enso and track its upgrade cadence.