REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 1.93 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php
Text
Base64
<?php namespace Illuminate\Notifications\Channels; use Illuminate\Notifications\Notification; use RuntimeException; class DatabaseChannel { /** * Send the given notification. * * @param mixed $notifiable * @param \Illuminate\Notifications\Notification $notification * @return \Illuminate\Database\Eloquent\Model */ public function send($notifiable, Notification $notification) { return $notifiable->routeNotificationFor('database', $notification)->create( $this->buildPayload($notifiable, $notification) ); } /** * Build an array payload for the DatabaseNotification Model. * * @param mixed $notifiable * @param \Illuminate\Notifications\Notification $notification * @return array */ protected function buildPayload($notifiable, Notification $notification) { return [ 'id' => $notification->id, 'type' => method_exists($notification, 'databaseType') ? $notification->databaseType($notifiable) : get_class($notification), 'data' => $this->getData($notifiable, $notification), 'read_at' => null, ]; } /** * Get the data for the notification. * * @param mixed $notifiable * @param \Illuminate\Notifications\Notification $notification * @return array * * @throws \RuntimeException */ protected function getData($notifiable, Notification $notification) { if (method_exists($notification, 'toDatabase')) { return is_array($data = $notification->toDatabase($notifiable)) ? $data : $data->data; } if (method_exists($notification, 'toArray')) { return $notification->toArray($notifiable); } throw new RuntimeException('Notification is missing toDatabase / toArray method.'); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
BroadcastChannel.php
1.99 KB
lrw-rw-rw-
2025-09-17 06:52:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DatabaseChannel.php
1.93 KB
lrw-rw-rw-
2025-09-17 06:52:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MailChannel.php
9.15 KB
lrw-rw-rw-
2025-09-17 06:52:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).