setOverrides example


    function fake($model, ?array $overrides = null, $persist = true)
    {
        $fabricator = new Fabricator($model);

        if ($overrides) {
            $fabricator->setOverrides($overrides);
        }

        if ($persist) {
            return $fabricator->create();
        }

        return $fabricator->make();
    }
}

if (function_exists('mock')) {
    
Home | Imprint | This part of the site doesn't use cookies.