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

Smart Response Laravel Package

quonain/smart-response

SmartResponse is a Laravel package that returns JSON API responses or Blade/Inertia views from the same controller method, auto-detecting request type (Accept header, /api routes, bearer tokens). Includes pagination, response shortcuts, macros, caching, and meta enrichment.

View on GitHub
Deep Wiki
Context7
1.1.1

Changed

  • Comprehensive README update: table of contents, detection guide, helper reference tables, v1.1 feature docs, Packagist sync note
1.1.0

Added

  • HTTP shortcut helpers: created(), noContent(), notFound(), unauthorized(), forbidden()
  • Trait helpers: smartCreated(), smartNoContent(), smartNotFound(), etc.
  • Global helpers: smart_created(), smart_not_found()
  • Response macros: response()->smartCreated(), response()->smartNotFound()
  • API meta enrichment (timestamp, request ID, optional API version) via MetaEnricher
  • Bearer token requests auto-detected as API (detection.bearer_as_api)
  • Cursor pagination meta support
  • Retry-After header on rate-limit responses
  • Extra translation keys for common errors

Fixed

  • Custom response headers now apply correctly on JSON responses
  • 204 No Content returns an empty body
1.0.1

Added

  • Laravel 13 support (illuminate/* ^13.0, orchestra/testbench ^11.0)
1.0.0

Added

  • Initial release of SmartResponse Laravel package
  • Unified API / Web response handling with automatic request detection
  • HasSmartResponse trait and smart_response() helper
  • Standardized JSON API structure with optional XML support
  • Pagination, Resource, and Collection support
  • Validation error formatting
  • Exception handler integration for API requests
  • Flash messages and optional toast notifications for web
  • Inertia.js and Livewire optional adapters
  • Response macros, events, logging hooks, and response caching
  • Rate limit response helper and OpenAPI examples
  • Pest PHP test suite
  • Full configuration publishing and Laravel auto-discovery
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