mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
53 lines
920 B
PHP
53 lines
920 B
PHP
<?php
|
|
|
|
namespace App\Notifications\Messages;
|
|
|
|
class GenericNotificationMessage
|
|
{
|
|
public string $title = '';
|
|
|
|
public string $content = '';
|
|
|
|
public string $url = '';
|
|
|
|
public int $priority = 5;
|
|
|
|
public static function create(string $content = ''): self
|
|
{
|
|
return resolve(static::class, ['content' => $content]);
|
|
}
|
|
|
|
public function __construct(string $content = '')
|
|
{
|
|
$this->content = $content;
|
|
}
|
|
|
|
public function title(string $title): self
|
|
{
|
|
$this->title = $title;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function content(string $content = ''): self
|
|
{
|
|
$this->content = $content;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function url(string $url): self
|
|
{
|
|
$this->url = $url;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function priority(int $priority): self
|
|
{
|
|
$this->priority = $priority;
|
|
|
|
return $this;
|
|
}
|
|
}
|