pvtl/voyager-frontend
Voyager Frontend extends Laravel Voyager with a public-facing site layer. It provides frontend routes, controllers, and Blade views for Voyager-managed content such as pages and posts, plus configurable templates and menu rendering to help build content-driven Laravel sites without leaving the Voyag...
composer.json constraints and pin laravel/framework and tcg/voyager accordingly. On Laravel 8+ / PHP 8 you will hit removed helpers (str_slug, array_get), replaced contracts, and Blade changes — expect to fork rather than composer require cleanly.composer require tcg/voyager pvtl/voyager-frontend
php artisan voyager:install --with-dummy # or your existing Voyager install
php artisan voyager-frontend:install # publishes config, views, assets
Run php artisan list | grep voyager to confirm the exact command signature in the release you pulled.config/voyager-frontend.php — theme, route prefix/middleware, view namespaces, image sizes, blocks.resources/views/vendor/voyager-frontend/ — the published Blade theme; this is what you actually edit.vendor/pvtl/voyager-frontend/src/Http/Controllers/ — PageController, PostController, etc., to see how models are resolved from slugs.pages, posts (and categories if you want archives). Set each BREAD's type column correctly (page, post) — the package keys off the BREAD model lookup, not the table name alone.about, visit /about, and confirm the package route renders your published theme's page view. That single loop — Voyager record → route → theme view — is the whole mental model. Everything else is repetition.slug. Treat Voyager slugs as public API: renaming one is a breaking URL change unless you add redirects. For hierarchical pages, use parent_id and build URLs like /parent/child; verify the package's controller honors nesting in your version, or override it.resources/views/vendor/voyager-frontend/ layer that @extends the package layout and overrides only the sections you need (content, head, scripts). This survives partial re-publishes and keeps diffs small.menu('main') renders the admin-managed tree; wrap it in your own partial so you can add classes, active-state logic, and aria-current without patching the package./{slug} shadows anything you add later.team_member or event BREAD, don't hack the Page controller — bind your own controller/route and reuse the published views. The package is a template, not a framework.Cache::remember around block/menu queries) and use php artisan view:cache in production. This is often the single biggest win.Voyager::addAction, model events) for admin-side enhancements rather than forking the package's service provider.voyager-frontend:install copies views into your app; composer update will not refresh them. Track upstream changes manually.php artisan config:clear && php artisan route:clear. A stale config cache is the #1 cause of "my changes do nothing."config:cache after deploys; verify the frontend prefix and middleware survive it.intervention/image + GD/Imagick and a storage symlink. Broken images are almost always a missing symlink or an unpublished image_sizes entry rather than a code bug.Voyager::model('Page') resolves and the BREAD row has the expected type. Dump the resolved model in the controller before assuming routing broke.php artisan route:list --path=your-prefix to confirm order; register specific routes earlier or add a where('slug', ...) constraint.route:list → resolved controller → dd($bread) → view name from config('voyager-frontend.views'). Nine times out of ten the failure is config, not code.vendor/ does not.How can I help you explore Laravel packages today?