mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
- fix panel issue where route is wrong - add store images for ebay - add walmart.com and walmart.ca to the stores - add new discount:update command to update the system - add new discount:test-notify to test the notification system. - fix route..page.my-profile not found
41 lines
958 B
PHP
41 lines
958 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Models\User;
|
|
use App\Notifications\ProductDiscount;
|
|
use Illuminate\Console\Command;
|
|
|
|
class DiscountTestNotificationCommand extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'discount:test-notify';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Test Notification and make sure it works fine';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle()
|
|
{
|
|
$users=User::all();
|
|
foreach ($users as $user)
|
|
$user->notify(new ProductDiscount(
|
|
product_name: 'This is a test product',
|
|
store_name: "this is a test store" ,
|
|
price: '100' ,
|
|
product_url: "https://cybrarist.com" ,
|
|
image: "",
|
|
currency: "$"));
|
|
}
|
|
}
|