Actualizacuion de Rama Kquiroz

This commit is contained in:
ellecio2
2023-09-04 19:53:37 -04:00
parent d2e9ba53ab
commit 2e99d7b290
2206 changed files with 100145 additions and 467275 deletions

View File

@@ -2,55 +2,18 @@
namespace App\Notifications;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\URL;
use App\Mail\EmailManager;
use Auth;
use App\Models\User;
class EmailVerificationNotification extends Notification
{
use Queueable;
// public $verificationCode;
// public function __construct($verificationCode)
// {
// $this->verificationCode = $verificationCode;
// }
// public function via($notifiable)
// {
// return ['mail'];
// }
// public function toMail($notifiable)
// {
// $verificationCode = $this->verificationCode;
// return (new MailMessage)
// ->subject(translate('Email Verification - ') . env('APP_NAME'))
// ->line('Your verification code is: ' . $verificationCode); // Mostrar el código de verificación en el correo
// }
// public function toArray($notifiable)
// {
// return [
// //
// ];
// }
}
/* class EmailVerificationNotification extends Notification
{
use Queueable;
public function __construct()
{
}
public function via($notifiable)
@@ -70,13 +33,10 @@ class EmailVerificationNotification extends Notification
return (new MailMessage)
->view('emails.verification', ['array' => $array])
->subject(translate('Email Verification - ').env('APP_NAME'));
->subject(translate('Email Verification - ') . env('APP_NAME'));
}
public function toArray($notifiable)
{
return [
//
];
}
} */
}

View File

@@ -0,0 +1,70 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class PayoutNotification extends Notification
{
use Queueable;
protected $user;
protected $amount;
protected $status;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($user, $amount, $status = '')
{
$this->user = $user;
$this->amount = $amount;
$this->status = $status;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['database'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'user_id' => $this->user['id'],
'user_type' => $this->user['user_type'],
'name' => $this->user['name'],
'payment_amount' => $this->amount,
'status' => $this->status
];
}
}

View File

@@ -0,0 +1,69 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ShopProductNotification extends Notification
{
use Queueable;
protected $type;
protected $product;
protected $status;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($type, $product, $status='pending')
{
$this->type = $type;
$this->product = $product;
$this->status = $status;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['database'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'id' => $this->product['id'],
'name' => $this->product['name'],
'status' => $this->status,
'type' => $this->type
];
}
}

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ShopVerificationNotification extends Notification
{
use Queueable;
protected $shop;
protected $status;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($shop, $status='submitted')
{
$this->shop = $shop;
$this->status = $status;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['database'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'name' => $this->shop['name'],
'id' => $this->shop['id'],
'status'=> $this->status
];
}
}