Nuevos cambios hechos de diseño
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
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 AppEmailVerificationNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$array['view'] = 'emails.app_verification';
|
||||
$array['subject'] = translate('Email Verification');
|
||||
$array['content'] = translate('Please enter the code:'.$notifiable->verification_code);
|
||||
|
||||
return (new MailMessage)
|
||||
->view('emails.app_verification', ['array' => $array])
|
||||
->subject(translate('Email Verification - ').env('APP_NAME'));
|
||||
}
|
||||
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
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)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$notifiable->verification_code = encrypt($notifiable->id);
|
||||
$notifiable->save();
|
||||
|
||||
$array['view'] = 'emails.verification';
|
||||
$array['subject'] = translate('Email Verification');
|
||||
$array['content'] = translate('Please click the button below to verify your email address.');
|
||||
$array['link'] = route('email.verification.confirmation', $notifiable->verification_code);
|
||||
|
||||
return (new MailMessage)
|
||||
->view('emails.verification', ['array' => $array])
|
||||
->subject(translate('Email Verification - ').env('APP_NAME'));
|
||||
}
|
||||
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
} */
|
||||
69
desarrollo2/app/Notifications/OrderNotification.php
Normal file
69
desarrollo2/app/Notifications/OrderNotification.php
Normal 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;
|
||||
use App\Models\Order;
|
||||
|
||||
class OrderNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
protected $order_notification;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($order_notification)
|
||||
{
|
||||
$this->order_notification = $order_notification;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
// return ['mail', 'database'];
|
||||
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 [
|
||||
'order_id' => $this->order_notification['order_id'],
|
||||
'order_code' => $this->order_notification['order_code'],
|
||||
'user_id' => $this->order_notification['user_id'],
|
||||
'seller_id' => $this->order_notification['seller_id'],
|
||||
'status' => $this->order_notification['status']
|
||||
];
|
||||
}
|
||||
}
|
||||
65
desarrollo2/app/Notifications/PasswordResetRequest.php
Normal file
65
desarrollo2/app/Notifications/PasswordResetRequest.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class PasswordResetRequest extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
protected $token;
|
||||
|
||||
public function __construct($token)
|
||||
{
|
||||
$this->token = $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$url = env('APP_URL') . '/password/reset/' . $this->token;
|
||||
return (new MailMessage)
|
||||
->line('You are receiving this email because we received a password reset request for your account.')
|
||||
->action('Reset Password', $url)
|
||||
->line('If you did not request a password reset, no further action is required.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class UserCredentialsNotification extends Notification
|
||||
{
|
||||
private $temporaryPassword;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($temporaryPassword)
|
||||
{
|
||||
$this->temporaryPassword = $temporaryPassword;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject('Credenciales de cuenta')
|
||||
->line('Muchas gracias por crear su cuenta. Aquí están sus credenciales:')
|
||||
->line('Correo: ' . $notifiable->email)
|
||||
->line('Contraseña: ' . $this->temporaryPassword)
|
||||
->line('Por favor, asegúrese de cambiar su contraseña después de iniciar sesión.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user