Weave 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

Presenter Laravel Package

culturegr/presenter

Culturegr Presenter is a lightweight Laravel package for the presenter pattern. Wrap Eloquent models or plain data objects in presenter classes to keep formatting, computed values, and view logic out of models and controllers, with a clean, testable API.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Check your Laravel version before anything else. v1.7.0 adds Laravel 13 support and is otherwise a no-op for existing users, so the only reason to bump is if you're moving the host app to Laravel 13. Confirm the release's composer.json now allows illuminate/*: ^13.0 (and that your PHP floor satisfies whatever Laravel 13 requires — verify this in the package's CI matrix rather than assuming).
  2. Read the diff, not just the changelog. This release is two lines: a constraint widening plus a test-only change implementing withQueryString() on the package's paginator stub. There is no new public API, no config key, no deprecation. Your first "use case" for v1.7.0 is literally: upgrade the host app, run the suite, confirm pagination still behaves.
  3. Where to look first if you're new to the package: the service provider's register()/boot() to see what's bound into the container, then the config file (if publishable) for the knobs you'll actually touch. The paginator stub in tests/ is worth a glance — it tells you exactly which paginator contract the package targets, which is the part that just changed.
  4. Minimal smoke test: hit any endpoint that returns paginated output and assert the links array and meta keys come back intact. That single request exercises the surface area this release touches.

Implementation Patterns

Constraint-first upgrade flow. Rather than composer update, do composer require <vendor>/<package>:^1.7 --with-all-dependencies in a branch. This forces Composer to resolve the new Laravel 13 constraints transitively and surfaces conflicts on your terms instead of halfway through a composer update on a Friday.

CI matrix split. If you support both Laravel 12 and 13, run a matrix with laravel/framework: ^12.0 and ^13.0 and require the package at ^1.6 and ^1.7 respectively. The two lines are behaviourally identical, so a green matrix here is strong evidence the bump is safe.

Treat the paginator stub as documentation. The withQueryString() addition is the package aligning its test double with the Laravel 13 LengthAwarePaginator contract. If you maintain your own fakes, anonymous classes, or in-memory paginator doubles in application tests, mirror the change:

$paginator = new class extends LengthAwarePaginator
{
    public function withQueryString(): static
    {
        return $this;
    }
};

Anything implementing or extending the paginator that lacks withQueryString() will fatal on Laravel 13 when appends()/withQueryString() is chained.

Version-pin in libraries, float in apps. If you publish a package that depends on this one, allow ^1.6|^1.7 so downstream apps aren't forced into a Laravel 13 upgrade just to get a transitive dependency. In applications, pin ^1.7 and let Renovate/Dependabot handle the patch bumps.

Integration tip: if you're doing the Laravel 13 jump in the same PR, sequence it as (a) bump Laravel, (b) bump this package, (c) run the pagination feature tests. Bisecting a combined major-framework-plus-package upgrade is miserable; the two commits cost you nothing.

Gotchas and Tips

  • "Tests:" changes are not always test-only for you. The withQueryString() work is in the package's own test stub, but the reason it exists — a contract change in Laravel 13's paginator — propagates to any custom paginator or fake you own. Grep your codebase for paginator subclasses before upgrading.
  • Silent query-string loss. On Laravel 13, a paginator double that doesn't implement withQueryString() may be tolerated in some paths and blow up in others. If page-2 links suddenly drop ?filter=..., check the paginator implementation before blaming the package.
  • Composer constraint staleness. If you use composer.lock and a private mirror, a widened constraint in the package doesn't take effect until you re-resolve. composer why-not illuminate/framework ^13.0 is the fastest way to find the blocker.
  • Don't expect new features here. No new config, no new methods, no deprecations. If you were waiting on a roadmap item, v1.7.0 doesn't ship it — pin the expectation to the next minor.
  • Debugging pagination regressions: ->toArray() the paginator and inspect links plus the path key. Most Laravel 13 pagination "breaks" are just path resolving differently behind a proxy, unrelated to this release.
  • Extension points unchanged. Custom paginator views and Paginator::defaultView() / defaultSimpleView() behaviour is untouched in this release; if you've overridden them, nothing to re-verify beyond the smoke test.
  • Rollback is trivial. Because the change is a constraint widening, reverting to ^1.6 on Laravel 12 is safe with no data or config implications — worth knowing if the Laravel 13 jump turns into a longer project than planned.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console