1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Umbrellio\TableSync\Integration\Laravel; |
||
6 | |||
7 | trait TableSyncable |
||
8 | { |
||
9 | public static $isTableSyncEnabled = true; |
||
10 | |||
11 | 14 | public static function bootTableSyncable() |
|
12 | { |
||
13 | 14 | if (static::$isTableSyncEnabled) { |
|
14 | 13 | static::observe(TableSyncObserver::class); |
|
15 | } |
||
16 | } |
||
17 | |||
18 | 10 | public function getTableSyncableAttributes(): array |
|
19 | { |
||
20 | 10 | return $this->getAttributes(); |
|
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
21 | } |
||
22 | |||
23 | 12 | public function classForSync(): string |
|
24 | { |
||
25 | 12 | return static::class; |
|
26 | } |
||
27 | |||
28 | 12 | public function exists(): bool |
|
29 | { |
||
30 | 12 | return $this->exists; |
|
31 | } |
||
32 | } |
||
33 |