- How do I install unisharp/laravel-pagerender in a Laravel app?
- Install it with Composer using composer require unisharp/laravel-pagerender. Like most Laravel packages, it should be picked up automatically through package auto-discovery. If the package ships a config file or migrations, publish them with php artisan vendor:publish and run php artisan migrate. Confirm the exact publish tags and service provider registration against the package's composer.json and README, because those details were not included in the supplied overview.
- Which Laravel and PHP versions does laravel-pagerender support?
- The package reached a stable 1.0.0 release, but the provided information does not declare a tested Laravel or PHP version matrix. Check the composer.json require and require-dev sections to see the exact Laravel and PHP constraints, and look for a CI workflow that tests those versions. Treat any constraint as unverified until you have run your own application's test suite against your target Laravel minor and PHP minor.
- How does laravel-pagerender resolve a page from a URL slug?
- The package stores page content with slugs so pages can be served at clean URLs. It provides a simple layer around view resolution and response output, so a route typically passes the slug to the package, which finds the matching page and renders it through a Blade view. Page resolution is described as customizable, so you can adapt the lookup logic if your application needs extra rules such as locale or tenant scoping.
- Can I customize the Blade views and layout used to render pages?
- Yes. The package is designed to separate page content from presentation and render pages using Blade templates and layouts. Developers keep control over layouts, partials, and routing, so you can publish or override the package views and point them at your application's existing layout. This makes it practical to keep a consistent site design while letting editors manage the page content itself.
- Do I need to publish and run database migrations for laravel-pagerender?
- Because pages are database-backed, the package almost certainly needs a pages table, which is normally shipped as a publishable migration. Publish the migration with vendor:publish, review the schema, then run php artisan migrate. The supplied overview does not include the exact migration filename or table name, so verify those in the package source before deploying to production.
- Is unisharp/laravel-pagerender suitable for a large production application?
- The package is described as lightweight and best suited to small projects that need straightforward page rendering without extra dependencies. Reaching 1.0.0 is a positive stability signal, but there is no track record of timely patches for new Laravel majors, and maintainer count and response times are unknown. For a critical production path, plan a fork-and-own contingency and re-validate the dependency against your own requirements before adopting it.
- How does laravel-pagerender integrate with Laravel routing and middleware?
- Pages are served through Laravel's normal routing layer, so you can attach middleware such as auth, cache headers, or localization to the page routes. The package is intended to integrate with Laravel routing and middleware rather than replace them, which keeps it easy to reason about and reversible. Avoid adding it behind global middleware or container rebinding, since that increases the blast radius when you upgrade Laravel.
- How is laravel-pagerender different from a full CMS like Statamic or October CMS?
- This is not a full CMS. It is a narrow layer around view resolution and response output, giving you database-backed pages rendered through Blade while you keep control of layouts, partials, and routing. That makes it a good fit when you only need simple, editor-managed pages inside an existing Laravel application. If you need workflows, media management, or a full admin UI, a dedicated CMS is a better comparison.
- How should I test page rendering with laravel-pagerender in my Laravel test suite?
- Use Laravel's HTTP tests with RefreshDatabase, seed or create a page record, then request its slug and assert the expected status, view, and content. Because the package sits in the view-resolution layer, asserting the rendered view name and a few key content fragments gives good coverage. Also test a missing slug to confirm your application returns a 404 rather than an unhandled exception.
- Does laravel-pagerender work with Laravel Octane, Redis, or queue workers?
- The package appears to be a simple database-backed page renderer, so it should not inherently conflict with Octane or non-default cache and queue drivers. However, compatibility with Octane, read/write database splitting, and Redis caching is not documented in the supplied overview and must be verified in your own environment. Run an integration spike against your actual drivers and include a smoke test in CI before relying on it.