jacobjoergensen/laravel-paper
| Install | |
|---|---|
composer require jacobjoergensen/laravel-paper |
|
| Latest Version: | 1.19.0 |
| PHP: | ^8.4 |
| License: | MIT |
| Last Updated: | Oct 7, 2026 |
| Links: | GitHub · Packagist |
Laravel Paper
Laravel Paper is a Laravel package that adds flat-file driver support for Eloquent. It supports Markdown, JSON, and YAML files and works with Laravel 12+ on PHP 8.4+.
Why Laravel Paper?
Two PHP 8 attributes and a trait. No custom database connection, no schema, your flat files use Eloquent's familiar query API.
Get Started
composer require jacobjoergensen/laravel-paper
Write a file in a content directory:
---
title: Building a Blog with Flat Files
published: true
date: "2024-03-15"
---
Your Markdown content goes here...
Point a model at that directory:
use Illuminate\Database\Eloquent\Model;
use JacobJoergensen\LaravelPaper\Attributes\ContentPath;
use JacobJoergensen\LaravelPaper\Attributes\Driver;
use JacobJoergensen\LaravelPaper\Paper;
#[Driver('markdown')]
#[ContentPath('content/posts')]
class Post extends Model
{
use Paper;
}
The filename without extension becomes the slug, which is the primary key. From there it is Eloquent:
$posts = Post::where('published', true)
->orderBy('date', 'desc')
->get();
$post = Post::find('hello-world');
Documentation
Find the full documentation at laravel-paper.com.
AI-Assisted Development
Paper ships a Laravel Boost skill. If your project uses
Boost, php artisan boost:install offers to install it, giving your AI agent Paper-specific
guidance for writing and querying flat-file models.
Contributing
See CONTRIBUTING.md for filing bugs and submitting PRs.
License
MIT. See LICENSE.
Related Packages
Laravel 4 and 5 package to deal with Pages and Blocks in a content management sy...
Filament-native content publishing for blog, docs, and AI-citable articles. Head...
Laravel 4 and 5 package to add media relations to Eloquent Models
Laravel 4 package to add pictures capabilities to Eloquent Models
A CommonMark extension that lets you use Laravel's route(), url(), and asset() h...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.19.0 | ^8.4 | ^12.0| | MIT | |
| 1.18.0 | ^8.4 | ^12.0| | MIT | |
| 1.17.0 | ^8.4 | ^12.0| | MIT | |
| 1.16.0 | ^8.4 | ^12.0| | MIT | |
| 1.15.0 | ^8.4 | ^12.0| | MIT | |
| 1.14.0 | ^8.4 | ^12.0| | MIT | |
| 1.13.0 | ^8.4 | ^12.0| | MIT | |
| 1.12.0 | ^8.4 | ^12.0| | MIT | |
| 1.11.0 | ^8.4 | ^12.0| | MIT | |
| 1.10.0 | ^8.4 | ^12.0| | MIT | |
| 1.9.0 | ^8.4 | ^12.0| | MIT | |
| 1.8.0 | ^8.4 | ^12.0| | MIT | |
| 1.7.0 | ^8.4 | ^12.0| | MIT | |
| 1.6.0 | ^8.4 | ^12.0| | MIT | |
| 1.5.0 | ^8.4 | ^12.0| | MIT | |
| 1.4.0 | ^8.4 | ^12.0| | MIT | |
| 1.3.0 | ^8.4 | ^12.0| | MIT | |
| 1.2.1 | ^8.4 | ^12.0| | MIT | |
| 1.2.0 | ^8.4 | ^12.0| | MIT | |
| 1.1.0 | ^8.4 | ^12.0| | MIT | |
| 1.0.0 | ^8.4 | ^12.0| | MIT |