Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Paper Laravel Package

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.

View on GitHub
Deep Wiki
Context7
1.15.0

What's Changed

  • Added whereNotLike and orWhereNotLike, the negated form of whereLike
  • Added unless, the counterpart to when, running its callback when the value is falsy
  • Fixed where to treat a column named after a PHP function, like date, as a column instead of a closure
  • Fixed where and orWhere to bind and tighter than or like SQL; a chain mixing the two silently dropped matching records
  • Fixed where with a null value to check the column for null, like Eloquent; it matched nothing before
  • Fixed find to apply the query's pending where constraints, so a filtered query no longer returns an excluded record
  • Fixed whereBetween and whereNotBetween to read the bounds by position like Laravel, so an array with string keys no longer raises a PHP error
  • Fixed save writing null over an array, json, object, or collection field whose file value the cast could not read
  • Fixed #[Timestamps] overwriting a frontmatter field with the file mtime when UPDATED_AT names a real field, and stripping that field from the file on save
  • Fixed JsonDriver to leave forward slashes unescaped, so saving a record no longer rewrites every URL in the file
  • Fixed MarkdownDriver to throw FileParseException for malformed frontmatter instead of a raw Symfony exception, so the error names the file

Dependencies

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.14.0...1.15.0

1.14.0

What's Changed

  • Improved the laravel-paper-development skill to cover lazy loading, route model binding, and driver extension order
  • Optimized queries to list the content directory once instead of once per driver extension
  • Fixed #[Driver] and #[ContentPath] to resolve on first use instead of when the model is instantiated

Dependencies

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.13.0...1.14.0

1.13.0

What's Changed

  • Added a benchmark suite (composer bench) measuring query performance across directory sizes
  • Added chunk and each to process records in batches over the lazy iterator
  • Added firstOrNew to return the first matching record or a new unsaved instance
  • Added findOr and firstOr to run a callback when no record matches
  • Added a key argument to pluck to key the results by a second column
  • Improved PaperRule exists and unique messages to use Laravel's validation translation lines so they respect the app locale
  • Improved unordered queries to return records in a stable slug order
  • Optimized paginate and simplePaginate to read only the current page's files when the query has no where clause and isn't ordered by a frontmatter field
  • Optimized updated_at to read each content file's modification time once instead of twice
  • Fixed whereNotBetween to exclude records whose column is missing, matching whereNotIn

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.12.0...1.13.0

1.12.0

What's Changed

  • Added min, max, sum, avg, and average aggregate methods, skipping null and non-numeric values like SQL aggregates skip NULL
  • Added route model binding so {model} and {model:field} resolve the matching record; scoped child bindings now throw UnsupportedRouteBindingException
  • Added Laravel Boost skill laravel-paper-development to give AI agents Paper-specific guidance
  • Optimized queries to read each content file's modification time once instead of twice
  • Fixed multi-column orderBy to treat the first column as primary and later columns as tiebreakers, matching Eloquent
  • Fixed queries returning a duplicate record when one slug exists under multiple driver extensions
  • Fixed whereIn and whereNotIn to compare loosely like where, so '1' matches an integer 1 read from frontmatter

Dependencies

New Contributors

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.11.0...1.12.0

1.11.0

Upgrade Notes

This release is backward compatible, but two things worth knowing before you upgrade:

  • retrieved now fires when a query returns a model, the same way it does in Eloquent. You should only notice this if you already have a retrieved listener.
  • Markdown frontmatter is now written in block style, and content-only files no longer get an empty block. Existing files reformat on their next save. The data is unchanged, so this only shows up as diffs in your content.

What's Changed

  • Added #[Timestamps] attribute to expose a model's file modification time as updated_at; created_at stays a frontmatter field
  • Added retrieved model event, fired for each model a query returns and skipped on count, exists, pluck, and bulk delete
  • Added bulk update to set values across all matching records
  • Added findMany for loading multiple records by slug in one call
  • Added orderByDesc as a descending order shortcut
  • Improved FileModificationCache with an in-process memo to avoid repeated cache lookups within the same request
  • Improved MarkdownDriver serialization to keep nested frontmatter in block style for cleaner diffs
  • Fixed MarkdownDriver to omit the frontmatter block for content-only models instead of writing an empty { } block

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.10.0...1.11.0

1.10.0

What's Changed

  • Added support for query scopes declared with Laravel's #[Scope] attribute, including protected methods
  • Added support for the #[CollectedBy] attribute so queries return the model's custom collection
  • Added create for saving a new record from an attribute array
  • Added firstOrCreate to return the first matching record or create it
  • Added updateOrCreate to update the first matching record or create it
  • Added saveQuietly to persist a record without firing model events
  • Added deleteQuietly to delete a record without firing model events
  • Fixed array, json, object, and collection casts so they read from and write to flat files as native structures

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.9.0...1.10.0

1.9.0

What's Changed

  • Added DriverRegistry so custom drivers can be registered with register()
  • Added PaperException interface implemented by all package exceptions
  • Added a column argument to PaperUniqueRule::ignore for excluding a record by a column other than the slug
  • Added simplePaginate to paginate without counting every record, reading only the rows the page needs
  • Added inRandomOrder for returning records in random order
  • Added value for reading a single column from the first match
  • Added firstWhere to fetch the first record matching a where condition
  • Added when for applying query clauses conditionally
  • Added whereAny, orWhereAny, whereAll, and orWhereAll for matching a value across multiple columns
  • Added whereLike and orWhereLike with an optional case-sensitive flag, matching Laravel semantics
  • Fixed delete to mark the model as no longer existing, matching Eloquent
  • Fixed path traversal in find, save, and delete by validating the slug is a single safe filename segment
  • Fixed save to accept "0" as a slug instead of rejecting it as empty
  • Fixed save to create the content directory when it is missing instead of failing silently
  • Fixed save to overwrite the existing file's extension on update instead of writing a duplicate .md next to a .markdown
  • Fixed save to sync model state so isDirty, wasChanged, and wasRecentlyCreated are correct afterward

Full Changelog: https://github.com/JacobJoergensen/laravel-paper/compare/1.8.0...1.9.0

1.8.0

What's Changed

  • Documented ignored Eloquent-parity parameters on all, find, findOrFail, and fresh
  • Documented that lazy lists files up front
  • Documented that hasManyPaper reads every related file on each call
  • Fixed file discovery for drivers with multiple extensions on musl libc (Alpine) containers
  • Fixed where comparison operators to exclude null fields, matching SQL semantics
  • Fixed save to write atomically via temp file + rename
  • Fixed paginate to resolve current page and path via Paginator
1.7.0

What's Changed

  • Added exists and doesntExist static methods to the Paper trait
  • Optimized count to skip file parsing when no where clauses are applied
  • Optimized exists and doesntExist to short-circuit on first match
1.6.0

What's Changed

  • Added sole query method for retrieving exactly one record
  • Optimized first to use early termination on unordered queries
  • Fixed lazy to pass callable instead of instantiated generator
1.5.0

What's Changed

  • Added scope support via __call on PaperQueryBuilder
  • Added belongsToPaper for O(1) relationship lookups
  • Added hasManyPaper for one-to-many relationships
1.4.0

What's Changed

  • Added lazy method for memory-efficient iteration with LazyCollection
  • Added PaperRule validation with exists and unique rules for Paper models
  • Added fresh and refresh methods for reloading models from file
  • Optimized cache layer to eliminate redundant lookups
1.3.0

What's Changed

  • Added bulk delete on query builder
  • Added exists and doesntExist query methods
1.2.1

What's Changed

  • Fixed two-argument where with string values not working correctly
1.2.0

What's Changed

  • Added where(closure) and orWhere(closure) for grouped conditions
  • Added whereContains and orWhereContains for array column filtering
  • Added whereNull, orWhereNull, whereNotNull and orWhereNotNull for null checks
  • Added whereBetween, orWhereBetween, whereNotBetween and orWhereNotBetween for range queries
  • Added latest and oldest ordering shortcuts
  • Added firstOrFail query method
  • Added paginate for pagination support
1.1.0

What's Changed

  • Added count, pluck, orWhere, whereIn, orWhereIn, whereNotIn and orWhereNotIn query methods
  • Added save and delete methods for write support
  • Added model events (creating, created, updating, updated, saving, saved, deleting and deleted)
1.0.0

Initial release

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky