macropay-solutions / laravel-crud-wizard-client-free
Request builder for calling projects that implement macropay-solutions/laravel-crud-wizard-free
1.0.5
2025-03-26 09:00 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
Requires (Dev)
- guzzlehttp/guzzle: ^7.5.0
- phpunit/phpunit: ^9.4
- psr/log: ^1.0 || ^2.0 || ^3.0
Suggests
- macropay-solutions/laravel-crud-wizard-free: dev-production
- macropay-solutions/laravel-crud-wizard-generator: dev-production
This package is not auto-updated.
Last update: 2025-03-26 14:30:22 UTC
README
This is a stripped down version of laravel-lumen-crud-wizard-client
and can be used for calling laravel-crud-wizard-free
Install
composer require macropay-solutions/laravel-crud-wizard-client-free
Start using it
$crud = new \MacroPaySolutions\LaravelCrudWizardClient\RequestBuilder(\env('API_BEARER'), \env('APP_URL')); try { $result = $crud->list('clients', $crud->getBuilder()->sort('country', 'asc') ->sort('zip')->equals('name', 'alt')->withRelation('relation') ->withRelations(['rel1', 'rel2']) ->addCountRelations(['relation1'])->addExistRelation('relation2'); $result = $crud->get('clients', '73', ['rel1', 'rel2']); $result = $crud->delete('clients', '73'); $result = $crud->create('clients', [ 'active' => '1', 'name' => 'abc', // ... ]); $result = $crud->update('clients', '73', [ 'active' => '1', 'name' => 'abc', // ... ]); } catch (\Exception $e) { $decodedErrorMessage = \json_decode($e->getMessage()); echo $decodedErrorMessage->message; } $decodedResult = \json_decode($result);
Discover more methods available by installing it.