Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/demo.cartinsight.co/Corals/core/Foundation/Notifications/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/demo.cartinsight.co/Corals/core/Foundation/Notifications/ExceptionsNotification.php
<?php

namespace Corals\Foundation\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;

class ExceptionsNotification extends Notification
{
    use Queueable;

    protected $exception;

    /**
     * SlackNotification constructor.
     * @param $exception
     */
    public function __construct($exception)
    {
        $this->exception = $exception;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param mixed $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['slack'];
    }

    /**
     * Get the array representation of the notification.
     *
     * @param mixed $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            //
        ];
    }

    public function toSlack($notifiable)
    {
        return (new SlackMessage())
            ->error()
            ->content(sprintf(':warning: %s [%s]',
                $this->exception->getMessage(), config('app.name')))
            ->attachment(function ($attachment) {
                $attachment->title('Trace:')
                    ->content($this->exception->getTraceAsString());
            });
    }
}

Spamworldpro Mini