Download the PHP package jeffersongoncalves/laravel-knowledge-base without Composer
On this page you can find all versions of the php package jeffersongoncalves/laravel-knowledge-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jeffersongoncalves/laravel-knowledge-base
More information about jeffersongoncalves/laravel-knowledge-base
Files in jeffersongoncalves/laravel-knowledge-base
Package laravel-knowledge-base
Short Description A Laravel package for building knowledge bases with articles, categories, versioning, and feedback
License MIT
Homepage https://github.com/jeffersongoncalves/laravel-knowledge-base
Informations about the package laravel-knowledge-base
Laravel Knowledge Base
A Laravel package for building knowledge bases with articles, categories, versioning, feedback, and search.
Features
- Article Management — Create, update, publish, archive, and soft-delete articles with UUID and slug routing
- Hierarchical Categories — Nested parent/child categories with ordering and activation control
- Article Versioning — Automatic version history tracking with editor attribution and change notes
- User Feedback — Helpful/not helpful voting with optional comments, supports authenticated and anonymous users
- Related Articles — Many-to-many article relationships with sort ordering
- Full-Text Search — Database-powered search across published articles by title and content
- SEO Fields — Built-in SEO title, description, and keywords per article
- Customizable Models — Override any model via config while maintaining contract compliance
- Table Prefix — Configurable table prefix to avoid naming collisions (default:
kb_) - Translations — English and Brazilian Portuguese out of the box
Requirements
- PHP 8.2+
- Laravel 11+
Installation
Publish and run migrations:
Publish the config (optional):
Configuration
The config file (config/knowledge-base.php) covers:
Table Prefix
Set to null to use table names without a prefix.
Custom Models
Override any model to extend the default behavior. Custom models must implement the corresponding contract:
Knowledge Base Settings
Search
Usage
Using the Service
The KnowledgeBaseService is the recommended way to interact with the knowledge base:
Creating Categories
Creating Articles
This automatically:
- Generates a UUID
- Creates version 1 (when versioning enabled)
- Dispatches
ArticleCreatedevent
Updating Articles
When versioning is enabled, this creates a new version entry with the editor and change notes.
Publishing & Archiving
Feedback
Feedback automatically increments helpful_count or not_helpful_count on the article and dispatches ArticleFeedbackReceived.
Search
Results are ordered by view_count descending (most popular first).
Using Models Directly
For queries outside the service, use ModelResolver:
Extending Models
Create custom models that implement the required contract:
Then update the config:
Events
| Event | Payload | When |
|---|---|---|
ArticleCreated |
$article |
After article creation via service |
ArticlePublished |
$article |
After publishing via service |
ArticleFeedbackReceived |
$article, $feedback |
After feedback submission |
Listen to events in your EventServiceProvider or with listeners:
Enums
ArticleStatus
| Value | Label (en) | Label (pt_BR) |
|---|---|---|
draft |
Draft | Rascunho |
published |
Published | Publicado |
archived |
Archived | Arquivado |
ArticleVisibility
| Value | Label (en) | Label (pt_BR) |
|---|---|---|
public |
Public | Público |
internal |
Internal | Interno |
Database Tables
All tables use the configured prefix (default: kb_):
| Table | Description |
|---|---|
kb_categories |
Hierarchical article categories |
kb_articles |
Knowledge base articles |
kb_article_versions |
Article version history |
kb_article_feedback |
User feedback on articles |
kb_article_relations |
Related articles (pivot) |
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Jefferson Gonçalves
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-knowledge-base with dependencies
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/events Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
spatie/laravel-package-tools Version ^1.15