Looking to hire Laravel developers? Try LaraJobs

criteria-from-laravel-request maintained by codelytv

Last update
2024/08/06 15:56 (dev-main)
Links
Downloads
2 326

Comments
comments powered by Disqus

🔒 Read-only repository

Any modification must be done in the main repository.

📥 Installation

composer require codelytv/criteria-from-laravel-request

💻 Usage

The criteria converter expect an url with the following format.

There are two ways to use this package.

Classic way:

Route::get('users', function (Request $request) {
    $fromConverter = new CriteriaFromLaravelRequestConverter();

    $criteria = $fromConverter->toCriteria($request);
});

Laravel way:

Route::get('users', function (Request $request) {
    $criteria = CriteriaFromLaravelRequestConverter::convert($request);
});