Skip to content

Instantly share code, notes, and snippets.

@Krucamper
Created December 2, 2019 10:04
Show Gist options
  • Save Krucamper/324965ef88e861500901b15c4df35994 to your computer and use it in GitHub Desktop.
Save Krucamper/324965ef88e861500901b15c4df35994 to your computer and use it in GitHub Desktop.
php artisan make:command SendEmails for laravel
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class SendEmails extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
// protected $signature = 'command:name'; ($signature ชื่อสำหรับเรียกใช้ command)
protected $signature = 'cron:sendemail';
/**
* The console command description.
*
* @var string
*/
// protected $description = 'Command description';
protected $description = 'Send email every minute using cron job.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment