Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
<?php
namespace App\Console\Commands;
use DB;
use Illuminate\Console\Command;
class MonitoringSystem extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ping:system';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Track system activity.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
DB::insert("INSERT INTO EventLog (Level, Source, Information) VALUES('Information', 'System', 'System is active.')");
}
}