Skip to content

Commit c18b054

Browse files
authored
docs: added installation part in README
1 parent 0fccb06 commit c18b054

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
The PHP Result Monad library provides a simple and effective way to handle the results of actions, offering an alternative approach to exception handling without the need for throwing exceptions. The core component of this library is the `Result` class, which encapsulates the outcome of an action and can be created from either a successful value or an exception.
66

7+
## 🔗 Installation
8+
9+
You can install this package via Composer:
10+
```bash
11+
composer require jefvda/php-result-monad
12+
```
13+
714
## Result Class
815

916
### Factory Methods
@@ -73,4 +80,4 @@ $failureMessage = $failureResult->match(
7380

7481
echo $successMessage; // Will display 'Success: Hello, Result!' -> as the `Result` was successful
7582
echo $failureMessage; // Will display 'Failure: Something went wrong.' -> as the `Result` was not successful
76-
```
83+
```

0 commit comments

Comments
 (0)