protected function loadMigrated() { $db = $this->db; isset($this->sql[$sqlKey = 'load_migrated']) or $this->sql[$sqlKey] = strtr('SELECT * FROM `table`', ['`table`' => $db->escapeIdentifier($this->table)]); $this->rawMigrated = $this->db->fetchAll($this->sql[$sqlKey]); foreach ($this->rawMigrated as $row) { $this->migrated[$row['file']] = $row['run_at']; } return $this; }
/** * Log a failed job into storage. * * @param string $connection * @param string $queue * @param string $payload * @return void */ public function log($connection, $queue, $payload) { $failed_at = date(DateTime::MYSQL_DATETIME); $this->db->insertAsDict($this->table, compact('connection', 'queue', 'payload', 'failed_at')); }