- What is avto-dev/back2front-laravel used for?
- It is a Laravel package for passing server-side values from your backend to the frontend. It exposes data prepared in Laravel to JavaScript so you can bootstrap single-page applications or Blade pages without creating a dedicated API endpoint. Typical uses include initial application state, user context, feature flags, and other configuration that is easier to prepare in PHP.
- How do I install avto-dev/back2front-laravel in a Laravel application?
- Install it with Composer using composer require avto-dev/back2front-laravel. Laravel package auto-discovery normally registers the service provider, so manual registration is usually unnecessary. If your application disables discovery or you need to override defaults, publish the package configuration and register the provider explicitly as described in the README.
- Which Laravel versions does avto-dev/back2front-laravel support?
- Version 2.10.0 supports Laravel 11, Laravel 12, and Laravel 13 according to its composer.json constraints. The minimum framework version is Laravel 11, so Laravel 10 applications cannot install 2.10.0. Confirm the exact constraint in composer.json and validate Laravel 13 in your own environment before relying on it in production.
- Does avto-dev/back2front-laravel 2.10.0 still work with Laravel 10?
- No. Version 2.10.0 requires Laravel 11 or newer, so Composer will refuse to install it on a Laravel 10 application. Teams still on Laravel 10 must remain on the 2.9.x line. Because Laravel 10 no longer receives security support, that should be treated as a short-term hold rather than a long-term plan.
- How do I pass data from Laravel to JavaScript without building an API endpoint?
- The package gives you a simple way to expose values prepared in Laravel to JavaScript in the rendered page. You set the data in your backend code and then read it from your frontend script, which is useful for SPA bootstrap state, configuration, or user-specific values. This avoids building and securing a separate API endpoint just to fetch initial data.
- Do I need to register the service provider or publish config for avto-dev/back2front-laravel?
- In a normal Laravel application, package auto-discovery registers the service provider, so manual registration is usually unnecessary. You only need to register the provider yourself if auto-discovery is disabled or you are working with a non-standard application structure. Publishing the configuration is optional and only needed when you want to override the package defaults.
- What PHP versions does avto-dev/back2front-laravel require?
- The 2.10.0 release notes mention PHP 8.5 in the Docker development image and a PHPUnit 10.5.35 floor, but those are development and CI concerns rather than a declared runtime change. Check the php constraint in composer.json and confirm which PHP versions are actually exercised in the package's CI matrix. Target PHP 8.2 through 8.5 only after verifying those versions are tested.
- What changed in version 2.10.0 and is it a breaking change?
- Version 2.10.0 is primarily a compatibility and tooling release, but it raises the minimum Laravel version to 11 and drops Laravel 10 support. That is effectively a breaking change for Laravel 10 consumers even though it was shipped as a minor version. If you are already on Laravel 11 or 12, the upgrade should be low risk; if you are on Laravel 10, stay on 2.9.x.
- How should I test that backend data reaches the frontend with this package?
- Test it like other view or response data: render the page or response that includes the exposed values and assert the expected payload in PHPUnit or Pest. You should also verify the browser-side result in an integration or end-to-end test, since the value must reach JavaScript correctly. Pin the package version in composer.json so a future minor release does not change test behavior unexpectedly.
- Is avto-dev/back2front-laravel production-ready and actively maintained?
- It is a conventional Laravel package with publishable configuration and standard Composer integration, and the maintainers appear to track Laravel majors on a reasonably short cadence. The main production caveat is version 2.10.0's framework floor: it drops Laravel 10 in a minor release and advertises Laravel 13 support that you should validate yourself before production use. For Laravel 11 and 12 applications it is reasonable to adopt, but keep Laravel 10 projects on 2.9.x until they can upgrade.