Add (initial): futurewalker code

This commit is contained in:
2023-11-20 00:15:18 +08:00
parent f8602cb456
commit 9ce3e5c82a
166 changed files with 15941 additions and 1072 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace App\Notifications;
use App\Models\Post;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use NotificationChannels\Telegram\TelegramMessage;
class PostIncomplete extends Notification
{
use Queueable;
protected $post;
/**
* Create a new notification instance.
*/
public function __construct(Post $post)
{
$this->post = $post;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['telegram'];
}
public function toTelegram($notifiable)
{
return TelegramMessage::create()
->content("*Incomplete Post*:\nPost ID: ".$this->post->id."\nPost Name: ".$this->post->title);
}
}