Devise\Support\DeviseSeeder::findRow PHP Method

findRow() protected method

Search for the row with these unique keys
protected findRow ( string $tableName, array $uniqueKeys, array $data ) : StdObject
$tableName string
$uniqueKeys array
$data array
return StdObject
    protected function findRow($tableName, $uniqueKeys, $data)
    {
        $uniqueKeys = is_array($uniqueKeys) ? $uniqueKeys : array($uniqueKeys);
        $table = DB::table($tableName);
        foreach ($uniqueKeys as $uniqueKey) {
            $table = $table->where($uniqueKey, '=', $data[$uniqueKey]);
        }
        return $table->first();
    }