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

Laravel Inputbag Laravel Package

jaikumar0101/laravel-inputbag

Fluent builder to standardize Laravel request inputs for search, pagination, and sorting. Provides sensible defaults, configurable global settings, and custom field mappings so controllers stay clean and API responses remain consistent (array or collection output).

View on GitHub
Deep Wiki
Context7
1.0.0

🎉 Initial Release

This is the first stable release of Laravel InputBag - a fluent builder for standardizing request inputs in Laravel applications.

✨ Features

  • Standard Input Processing - Automatically process common request parameters:

    • search - Search query handling
    • page - Pagination current page
    • per_page - Items per page
    • sort_by - Column to sort by
    • order_by - Sort direction (asc/desc)
  • Fluent API - Chain methods for clean and readable code

    InputBag::set('status', 'filter_status', 'active')
        ->standard()
        ->toArray();
    
  • Custom Field Mapping - Map custom request fields with default values

    InputBag::set('category', 'category_id')
        ->set('min_price', 'price_min', 0)
        ->standard()
        ->toCollection();
    
  • Configurable Defaults - Publish configuration file to customize:

    • Default items per page (15)
    • Default sort column (id)
    • Default sort direction (desc)
  • Multiple Output Formats

    • toArray() - Returns as plain PHP array
    • toCollection() - Returns as Laravel Collection
  • Laravel Facade Support - Use via convenient facade:

    use Jaikumar0101\LaravelInputbag\Facades\InputBag;
    

📦 Package Information

  • PHP Version: 8.1 or higher
  • Laravel Version: 10.x | 11.x
  • License: MIT

🔧 Configuration

Publish configuration with:

php artisan vendor:publish --tag="inputbag-config"

📝 Documentation

Complete documentation available in README.md including:

  • Installation instructions
  • Basic and advanced usage examples
  • API reference
  • Configuration options
  • Example API requests

🙏 Credits

📄 License

The MIT License (MIT). Please see License File for more information.


Full Changelog: https://github.com/jaikumar0101/laravel-inputbag/commits/v1.0.0

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.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk