netflex/pages
Netflex Pages provides page and structure models for Laravel applications built on the Netflex CMS, letting you define, query, and render hierarchical page trees with templates and content bindings through familiar Eloquent-style APIs.
This package is a read-only subtree split of the Netflex Pages component. Do not install it in isolation expecting a self-contained library — the canonical source of truth, issues, and pull requests live in netflex/framework. Treat netflex/pages as a convenience artifact for Composer resolution only.
Minimal steps:
composer require netflex/framework and get Pages transitively. Only require netflex/pages directly if you are deliberately pinning a subcomponent or building tooling that introspects the split.netflex/framework, locate the packages/pages (or similarly named) directory. That is where commits land; this repo is regenerated from it.composer.json extra.laravel.providers. Confirm it appears in php artisan about / bootstrap/cache/packages.php. If you are on an older Laravel or a non-standard skeleton, add it manually in config/app.php.php artisan vendor:publish --provider=...) covering route prefixes, template/view namespaces, and cache TTLs. Read it before writing code — most "why is my page not resolving" issues are config, not code.Route::get('/{path?}', ...)->where('path', '.*')), let the package's page resolver look up the structure for that path, and hand the resulting page object to a Blade view. Once that works end-to-end, layer in templates and content blocks.If you are evaluating rather than adopting: the 0-star / 0-dependent signal means there is effectively no community support surface. Your documentation is the source code and the Netflex platform docs. Budget time for reading.
Model-centric access. Expect a Page-style Eloquent model (or repository) exposed by the package. Day-to-day you will query pages by path/slug, by parent, or by template, then pass the model into views. Prefer the package's query scopes over raw where() calls so published/visible/scheduling filters stay applied.
Template binding. Pages typically map to a template identifier that resolves to a Blade view. Keep the mapping in config or a dedicated registry class rather than scattering view() calls — this is the seam you will most often need to extend when a client wants a custom layout.
Route + middleware integration. The common workflow is a single catch-all route guarded by package middleware (domain/host resolution, redirect handling, 404 fallback). Put your own middleware after the resolution middleware so $request already carries the resolved page; anything before it will see an unresolved request.
Content blocks / structure traversal. Pages are usually composed of nested structures. Recurse through the structure once in a view composer or presenter, and render partials per block type via a match/switch on block type. Avoid querying inside Blade loops — eager-load or pre-hydrate the structure before the view layer.
Caching as a first-class concern. Anything served by a CMS page component should be cached at the resolved-page level (path → page ID → rendered output). Wrap resolution in Cache::remember keyed on host + path + locale, and hook the package's save/delete events to bust those keys. Netflex apps typically also sit behind a CDN, so get cache tags/keys right early.
Extending via container bindings. Where the package exposes an interface (resolver, template registry, URL generator), bind your own implementation in a service provider rather than subclassing internals. Subclassing a subtree-split package is fragile across framework upgrades.
Local development loop. Because this is a split repo, test your changes by path-repository-ing netflex/framework into your app (composer config repositories.framework path ../framework) and working against the full source. Never patch vendor/netflex/pages — it will be blown away on the next composer update.
netflex/framework. If you need a fix, fork the framework.netflex/pages version with an incompatible netflex/framework version produces subtle autoload/API mismatches. Constrain both with the same caret range, or just require the framework alone.netflex/framework and netflex/pages are required and the framework also ships the Pages namespace, you can get class-map collisions or "cannot redeclare class" errors. Check composer why netflex/pages before debugging anything else.php artisan config:cache will freeze route prefixes and template paths. A very common symptom — "changes to config/pages.php do nothing in staging" — is a stale config cache. php artisan optimize:clear first, always.page:{id} cache key will leak content between hosts. Always include host and locale in the key.resources/views/vendor/..., and event listeners for cache busting. Avoid touching internals — the split is regenerated and internal classes are free to move.composer.json for this component, upgrade deliberately alongside the framework, and re-read the framework changelog (not this repo's) before bumping.How can I help you explore Laravel packages today?