Add (ai tool submission)
This commit is contained in:
39
app/Notifications/AiToolSubmitted.php
Normal file
39
app/Notifications/AiToolSubmitted.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\SubmitTool;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use NotificationChannels\Telegram\TelegramMessage;
|
||||
|
||||
class AiToolSubmitted extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
protected $submit_tool;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*/
|
||||
public function __construct(SubmitTool $submit_tool)
|
||||
{
|
||||
$this->submit_tool = $submit_tool;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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("*AI Tool Submitted*:\nURL: ".$this->submit_tool->submitted_url."\nBy: ".$this->submit_tool->social.' in '.$this->submit_tool->social_type."\nEmail: ".$this->submit_tool->email."\nFound us from: ".$this->submit_tool->source.' from '.$this->submit_tool->source_type."\n\nComments: ".$this->submit_tool->comments);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user