- 修改.env裡面的設定
- 安裝php必要的library、設定laravel的access key
composer install
php artisan key:generate
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=test
DB_USERNAME=allensu
DB_PASSWORD=
php artisan serve // default port is 8000
或是指定port號
php artisan serve --port=8001
php artisan soyal:soyal-message-server start
// 新加上一行指令, 指令代表 每分鐘執行一次
* * * * * php /var/www/html/soyalmiddleware/artisan schedule:run >> /dev/null 2>&1
- 要執行的 Laravel Command 在 Console/Kernel.php 檔做設定
protected function schedule(Schedule $schedule)
{
$schedule->command('soyal:daily-devices-update-pin-code')->everyMinute();
...
...
}