Raffales-LMS/app/Console/Commands/RunQueueJob.php
2024-04-16 15:43:24 +05:45

49 lines
945 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class RunQueueJob extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'run:queue';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Run the Queue for Send mails';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
\Log::info("Cron is working fine!");
$myfile = fopen(__DIR__."/newfile.txt", "w") or die("Unable to open file!");
$txt = "John Doe\n";
fwrite($myfile, $txt);
$txt = "Jane Doe\n";
fwrite($myfile, $txt);
fclose($myfile);
}
}