public function __construct($model, ?array
$formatters = null, ?string
$locale = null
) { if (is_string($model)) { // Create a new model instance
$model =
model($model, false
);
} if (!
is_object($model)) { throw new InvalidArgumentException(lang('Fabricator.invalidModel'
));
} $this->model =
$model;
// If no locale was specified then use the App default
if ($locale === null
) { $locale =
config(App::
class)->defaultLocale;
}