You are viewing documentation for an outdated version. It is no longer supported!
Custom Default
To overwrite the default resolved instance, overwrite the getDefault[Dependency]
method.
use Aedart\Support\Helpers\Config\ConfigTrait;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Config\Repository as Config;
class Box
{
use ConfigTrait;
public function getDefaultConfig(): ?Repository
{
return new Config([
'width' => 25,
'height' => 25
]);
}
// ... remaining not shown ... //
}