Created
August 13, 2021 16:49
-
-
Save Shelob9/818191ddf97f7794d1aa6d9d11972048 to your computer and use it in GitHub Desktop.
Resolve from Laravel service container, with dependency
This file contains 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
//Resolve from service container | |
app()->makeWith(Replacer::class, [ | |
'build' => $build | |
]); | |
//Similar to: | |
new Replacer($build); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment