mirror of
https://github.com/jonathan-martz/pocketbase-php-sdk.git
synced 2026-04-03 07:27:42 +00:00
merge into master
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
##### This Repository are in active Development
|
##### This Repository are in active Development
|
||||||
***
|
***
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
composer require mkay-development/pocketbase-php-sdk
|
||||||
|
```
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
// Example init and use
|
// Example init and use
|
||||||
use \Pb\Client as pb;
|
use \Pb\Client as pb;
|
||||||
@@ -35,4 +39,4 @@ $pb->collection(collectionIdOrName)->update(string $recordId, array $bodyParams
|
|||||||
|
|
||||||
// Deletes a single record by its id.
|
// Deletes a single record by its id.
|
||||||
$pb->collection(collectionIdOrName)->delete(string $recordId, array $queryParams = []);
|
$pb->collection(collectionIdOrName)->delete(string $recordId, array $queryParams = []);
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Client
|
|||||||
return new UsersCollection($this->url, 'records');
|
return new UsersCollection($this->url, 'records');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function collection($url,string $collection, int $page = 1)
|
public function collection(string $collection)
|
||||||
{
|
{
|
||||||
return new Collection($this->url ,$collection);
|
return new Collection($this->url ,$collection);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class Collection
|
|||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public static string $token = '';
|
private static string $token = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
@@ -32,7 +32,6 @@ class Collection
|
|||||||
$this->collection = $collection;
|
$this->collection = $collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $batch
|
* @param int $batch
|
||||||
* @param array $queryParams
|
* @param array $queryParams
|
||||||
|
|||||||
Reference in New Issue
Block a user