onemineral / php-sdk
Onemineral PMS - PHP SDK
1.0.29
2025-04-01 11:19 UTC
Requires
- php: 8.*
- ext-json: *
- guzzlehttp/guzzle: ^7.5
- illuminate/collections: 9.*|10.*|11.*|12.*
- illuminate/database: 9.*|10.*|11.*|12.*
- illuminate/http: 9.*|10.*|11.*|12.*
- illuminate/pagination: 9.*|10.*|11.*|12.*
- illuminate/validation: 9.*|10.*|11.*|12.*
- phpoption/phpoption: ^1.9
Requires (Dev)
README
Install
composer require onemineral/php-sdk
Initialize the sdk
use Onemineral\PMS\SDK\PMS;
PMS::setBaseURL('https://demo.rentalwise.io');
PMS::setToken('rentalwise-api-token');
Query properties
use Onemineral\PMS\SDK\PMS;
use Onemineral\PMS\SDK\Conditions;
use Onemineral\PMS\SDK\Paginator;
// Build conditions for property fields
$conditions = Conditions::factory()
// query only enabled properties
->where('status', '=', 'enabled')
// and where properties are in these location ids
->where('location', 'in', [1, 2, 3]);
/** @var Paginator $propertiesPaginator **/
$propertiesPaginator = PMS::property()->query()
// apply conditions
->where($conditions);
// paginate response
->paginate(1, 10)
// include property location relation in response
->with(['location']);
->get();