<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitalcloud / multilingual-notification example snippets
namespace App;
use Digitalcloud\ReactiveNotification\Traits\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
}
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Digitalcloud\ReactiveNotification\Channels\DatabaseChannel;
class InvoicePaid extends Notification implements ShouldQueue
{
use Queueable;
public function via($notifiable)
{
return [DatabaseChannel::class,'.../'];
}
public function toDatabase($notifiable){
return [
"title"=> trans("invoice_title"),
"details"=> trans("invoice_details"),
];
}
}