Download the PHP package tilabs/laravel-content without Composer
On this page you can find all versions of the php package tilabs/laravel-content. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tilabs/laravel-content
More information about tilabs/laravel-content
Files in tilabs/laravel-content
Package laravel-content
Short Description A markdown based headless cms inspired by nuxt/content and Caleb Porzio.
License MIT
Informations about the package laravel-content
Laravel Content by Tilabs
⚡️ Generate markdown based Blog Posts with ease. Inspired by @nuxt/content and Caleb Porzio.
Why this package
I personally use this package in a lot of cms based websites. This is only a very rough version, but I will improve it over time.
Requirements
Version | |
---|---|
PHP | ^8.2 |
Laravel | ^12.0 |
Sushi by Caleb Porzio | ^2.5 |
League Commonmark | ^2.6 |
Installation & Usage
Publish the configuration
Write content
Place your Markdown files inside
/content
Create Markdown files anywhere under the configured content directory.
Front-matter drives titles, tags, and publication status.
Files without a published key will automatically be drafted
Slug rules
- Directories are flattened and joined by the configured separator ("_" by default).
- Numbers or dates at the start of a segment are stripped (2025-05-27-, 01-, etc.).
- Files named index.md are ignored in the slug
- Example file tree → slug mapping:
Query content in code
If you cannot see your changes right away, jump to the next chapter
You can now query the markdown content like an Eloquent Model thanks to Sushi. Content already has published
and drafted
scopes to filter for Content.
Refreshing Content
Whenever you rename, add, or delete Markdown files in production, clear the Sushi-based cache:
During local development you can disable caching ('cache' => false) and the model will refresh on every request.
License
Laravel Deploy is open‑sourced software licensed under the MIT license.
All versions of laravel-content with dependencies
calebporzio/sushi Version ^2.5
illuminate/console Version ^12.15
illuminate/database Version ^12.0
illuminate/support Version ^12.0
league/commonmark Version ^2.6