jacobjoergensen/laravel-paper
Laravel Paper adds flat-file drivers to Eloquent for Laravel 12+ (PHP 8.4+). Point a model to a content directory and query Markdown or JSON files with familiar Eloquent APIs—no database, schema, or custom connection. Uses attributes + a trait.
Post::where('published', true)->get()) while abstracting file I/O. Reduces learning curve for developers accustomed to Eloquent.LIKE, JSON operations) may require custom logic or external tools (e.g., Algolia, Meilisearch).Post, Page) with flat-file equivalents.Post::where('published', true)).Model::toArray() + custom templating).$posts = Post::all();
foreach ($posts as $post) {
File::put("content/posts/{$post->slug}.md", $this->convertToMarkdown($post));
}
resolveModel() method).Post::with('comments') loads all related files).->published()).mtime for updated_at; created_at requires manual YAML frontmatter.deleted/ directory).->paginate()), search, or complex validations.Post, DocumentationPage).Storage::lock()).chmod, chown).config/filesystems.php).How can I help you explore Laravel packages today?