Download src/app/Traits/Notifyable.php from pnacorp/xsender: direct link, hf CLI and curl.
- Browser
- Download file 649 Bytes
-
https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Traits/Notifyable.php
- Command line
-
hf download hf://pnacorp/xsender/src/app/Traits/Notifyable.php
-
curl -L -o Notifyable.php https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Traits/Notifyable.php
649 Bytes
| namespace App\Traits; | |
| use Carbon\Carbon; | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Illuminate\Validation\ValidationException; | |
| trait Notifyable | |
| { | |
| protected function notify(array $notifications) :void { | |
| foreach ($notifications as $notification => $config) { | |
| if (notify($notification)) { | |
| $action = $config['action']; | |
| $params = $config['params']; | |
| foreach ($params as $paramSet) { | |
| if ($paramSet) { | |
| call_user_func_array($action, $paramSet); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |