This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rewire = require('rewire'); | |
const defaults = rewire('react-scripts/scripts/start.js'); | |
const configFactory = defaults.__get__('configFactory'); | |
const devConfigFactory = configFactory('development'); | |
// Do stuff | |
// i.e. devConfigFactory.module.rules.xxxxxx | |
const patchedDevConfigFactory = function() { | |
return devConfigFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function toArray() | |
{ | |
$attributes = $this->attributesToArray(); | |
$attributes = array_merge($attributes, $this->relationsToArray()); | |
// Detect if there is a pivot value and return that as the default value | |
if (isset($attributes['pivot']['value'])) { | |
$attributes['value'] = $attributes['pivot']['value']; | |
unset($attributes['pivot']); | |
} |