Files
Discount-Bandit/app/Console/Commands/DiscountTestNotificationCommand.php
YNWA Fawzy f927bfb6c0 - add walmart stores to the list of products.
- 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
2023-12-06 12:01:31 +04:00

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: "$"));
}
}