refactor(notifications): standardize getRecipients method signatures
This commit is contained in:
@@ -3,16 +3,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Jobs\PullHelperImageJob;
|
||||
use App\Notifications\Channels\SendsEmail;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Spatie\Url\Url;
|
||||
|
||||
class InstanceSettings extends Model implements SendsEmail
|
||||
class InstanceSettings extends Model
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
protected $casts = [
|
||||
@@ -92,15 +88,15 @@ class InstanceSettings extends Model implements SendsEmail
|
||||
return InstanceSettings::findOrFail(0);
|
||||
}
|
||||
|
||||
public function getRecipients($notification)
|
||||
{
|
||||
$recipients = data_get($notification, 'emails', null);
|
||||
if (is_null($recipients) || $recipients === '') {
|
||||
return [];
|
||||
}
|
||||
// public function getRecipients($notification)
|
||||
// {
|
||||
// $recipients = data_get($notification, 'emails', null);
|
||||
// if (is_null($recipients) || $recipients === '') {
|
||||
// return [];
|
||||
// }
|
||||
|
||||
return explode(',', $recipients);
|
||||
}
|
||||
// return explode(',', $recipients);
|
||||
// }
|
||||
|
||||
public function getTitleDisplayName(): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user