Feuerwehr-eppingen/app/Console/Commands/PublishNotify.php

32 lines
684 B
PHP

<?php
/**
* Created by PhpStorm.
* User: Marco Glietsch
* Date: 10.12.2018
* Time: 16:31
*/
namespace App\Console\Commands;
use App\Helpers\PublishHelper;
use Illuminate\Console\Command;
use App\Models\User;
class PublishNotify extends command
{
protected $signature = 'publish:notify {--postId=} {--platform=*}';
protected $description = 'Schickt eine Benachrichtigung für einen veröffentlichten Post';
public function __construct()
{
parent::__construct();
}
public function handle()
{
$postId = $this->option('postId');
$platforms = $this->option('platform');
PublishHelper::publishNotification($postId, $platforms, ['debug' => true]);
}
}