first commit
This commit is contained in:
48
app/Console/Commands/RunQueueJob.php
Normal file
48
app/Console/Commands/RunQueueJob.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user