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 Illuminate\Http\Resources;
use JsonSerializable;
use Illuminate\Support\Collection;
class MergeValue
{
/**
* The data to be merged.
*
* @var array
*/
public $data;
/**
* Create new merge value instance.
*
* @param \Illuminate\Support\Collection|\JsonSerializable|array $data
* @return void
*/
public function __construct($data)
{
if ($data instanceof Collection) {
$this->data = $data->all();
} elseif ($data instanceof JsonSerializable) {
$this->data = $data->jsonSerialize();
} else {
$this->data = $data;
}
}
}