Skip to content

Commit 2819139

Browse files
committed
wip
1 parent 8b0ca9f commit 2819139

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This package will send the following data object through your custom pipeline:
4545

4646
```php
4747
$data = app(Data::class, [
48-
'event' => $event,
48+
'event' => $events,
4949
'model' => $payload[0],
5050
'payload' => $payload,
5151
]);

src/Data.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
namespace Inmanturbo\Modelware;
44

5-
class Data
6-
{
5+
use AllowDynamicProperties;
6+
7+
#[AllowDynamicProperties]
8+
class Data {
79
public function __construct(
810
public mixed $event,
911
public ?object $model = null,

src/Modelware.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public function add(string $event, array $pipes, string $prefix = 'modelware'):
1818
});
1919
}
2020

21-
protected static function eventPipeline(string $event, array $payload, $events, string $prefix): bool
21+
protected static function eventPipeline(string $event, array $payload, $events, string $prefix)
2222
{
2323
$data = app(Data::class, [
24-
'event' => $event,
24+
'event' => $events,
2525
'model' => $payload[0],
2626
'payload' => $payload,
2727
]);

0 commit comments

Comments
 (0)