* Fix rowmapper generator, check for fields, map users #443 * Formatting * Remove value store at the end of the import * Update the notes for the importer about users * Uncomment importers disabled during testing
This commit is contained in:
@@ -8,13 +8,15 @@ use Modules\Importer\Services\BaseImporter;
|
||||
class RankImport extends BaseImporter
|
||||
{
|
||||
protected $table = 'ranks';
|
||||
protected $idField = 'rankid';
|
||||
|
||||
public function run($start = 0)
|
||||
{
|
||||
$this->comment('--- RANK IMPORT ---');
|
||||
|
||||
$count = 0;
|
||||
foreach ($this->db->readRows($this->table, $start) as $row) {
|
||||
$rows = $this->db->readRows($this->table, $this->idField, $start);
|
||||
foreach ($rows as $row) {
|
||||
$rank = Rank::firstOrCreate(['name' => $row->rank], [
|
||||
'image_url' => $row->rankimage,
|
||||
'hours' => $row->minhours,
|
||||
|
||||
Reference in New Issue
Block a user