genj/faq-bundle
A Symfony bundle for adding a managed FAQ section to your application. Includes categorized questions, admin controls, and ready-to-use entities, controllers, and templates for quick integration.
This is a Symfony 3 bundle, not a Laravel package. Do not try to composer require genj/faq-bundle in a Laravel application: it has no Laravel service provider, no auto-discovery, and its Symfony 3 constraints will conflict with the Symfony components Laravel depends on. A Laravel developer leverages this package as a reference implementation, not as a runtime dependency.
First places to look:
composer.json — confirm the Symfony/PHP constraints and what the bundle actually depends on.Entity/ — the Doctrine models for FAQ items/categories. This is the schema you will port to Eloquent migrations. In v2.0.0 look for the new isActive, publishAt, and expiresAt fields.Controller/ — the list/detail/admin CRUD flow, plus the new search and popular-queries endpoints. This maps to Laravel resource controllers.Resources/config/ — routing, service definitions, and bundle configuration.Resources/views/ — Twig templates to translate into Blade components.If you genuinely need to run the original, build a Symfony 3.4 sandbox on PHP 7.x, register the bundle in AppKernel, configure Doctrine, and import its routing. The v2.0.0 release is only marked "compatible with sf3.2", so prefer the newest 3.x you can run.
For day-to-day Laravel work, the first useful use case is: extract the FAQ schema, the scheduling/active flags, and the CRUD + search flow, then rebuild it natively in Laravel with migrations, Eloquent models, form requests, and Blade views.
The package follows classic Symfony 3 conventions: Doctrine entities, bundle service definitions, controller actions, and Twig templates. In Laravel terms, translate each layer rather than trying to bridge containers.
Schema and models
isActive (boolean), publishAt (nullable datetime), and expiresAt (nullable datetime).$fillable, $casts, and relationships (belongsTo category, hasMany items). Cast the schedule fields: 'is_active' => 'boolean', 'publish_at' => 'datetime', 'expires_at' => 'datetime'.active() scope combining is_active = true AND (publish_at IS NULL OR publish_at <= now()) AND (expires_at IS NULL OR expires_at > now()). This is the equivalent of the bundle's scheduling behavior; keep it in one reusable scope so public listing and search stay consistent.Controllers and routing
index, show for the public side; admin.index, admin.create, admin.store, admin.edit, admin.update, admin.destroy for management.GET /faq/search endpoint mirroring the bundle's "very simple MySQL search" — a where('question', 'like', "%{$q}%") OR where('answer', ...) query is the direct equivalent. Do not over-engineer it: the bundle's own implementation is deliberately naive.search_queries (or faq_searches) table logging the term + timestamp, then a groupBy/orderByRaw('COUNT(*) DESC') aggregation on the admin dashboard.FormRequest validation and Blade form components. Validate publish_at < expires_at when both are present.auth for admin routes).Views and content
lang/ PHP or JSON files.published(), active(), and ordered().Integration tips
publish_at/expires_at boundaries pass (a scheduled job or short TTL is simplest).--ignore-platform-reqs to work around this.AppKernel), Doctrine mapping, and Twig.isActive/publishAt/expiresAt trio has ambiguous precedence — does isActive = false override publishAt, or vice versa? Read the entity/repository code to see the exact rule, then encode it once in a scope and test all combinations. Do not assume; diff the generated Doctrine SQL.FULLTEXT index instead of faithfully porting the naive version.faq_search_log model with indexes on term and created_at.bin/console debug:router and doctrine:schema:validate to inspect what is actually wired.composer.json of a Laravel project.How can I help you explore Laravel packages today?