Skip to content

Commit

Permalink
πŸ“ Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonJnsson committed Jan 9, 2024
1 parent c5c1405 commit 62c9563
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,21 @@ composer require morningtrain/economic

## Usage

### Updating a resource
Some resources can be updated after creation. This can be done as follows:

```php
$skeleton = new Morningtrain\Economic();
echo $skeleton->echoPhrase('Hello, Morningtrain!');
$customer = new \Morningtrain\Economic\Resources\Customer([
'customerNumber' => 1,
]);

$customer->name = 'New name';

$customer->save();
```

This will update the customer name in E-conomic.

## Testing

```bash
Expand Down

0 comments on commit 62c9563

Please sign in to comment.