1
0
Fork 0
mirror of synced 2024-07-04 14:10:33 +12:00

Update php GETTING_STARTED.md

This commit is contained in:
Pratik Gupta 2023-10-17 01:43:09 +05:30 committed by GitHub
parent e93681afc0
commit 086116d0f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ Once your SDK object is set, create any of the Appwrite service objects and choo
```php
$users = new Users($client);
$user = $users->create(ID::unique(), 'email@example.com', 'password');
$user = $users->create(ID::unique(), email = 'email@example.com', phone = '+123456789', password = 'password', name = "Walter O'Brien");
```
### Full Example
@ -40,7 +40,7 @@ $client
$users = new Users($client);
$user = $users->create(ID::unique(), 'email@example.com', 'password');
$user = $users->create(ID::unique(), email = 'email@example.com', phone = '+123456789', password = 'password', name = "Walter O'Brien");
```
### Error Handling
@ -49,7 +49,7 @@ The Appwrite PHP SDK raises `AppwriteException` object with `message`, `code` an
```php
$users = new Users($client);
try {
$user = $users->create(ID::unique(), 'email@example.com', 'password');
$user = $users->create(ID::unique(), email = 'email@example.com', phone = '+123456789', password = 'password', name = "Walter O'Brien");
} catch(AppwriteException $error) {
echo $error->message;
}