Closed mattstauffer closed 1 month ago
Current version of this introduces two concepts: the Context
class, and its two children, Herd
and Standalone
.
You can ask at any point for an instance of Context
:
$context = resolve(Context::class);
if ($context->isHerd()) {
// Do something
}
Or you can ask for the currently bound context:
echo sprintf(
"You are currently using %s",
resolve(Context::class)->name(), // If you're on Herd, returns an instance of `Herd`, so name is "Laravel Herd"
);
Closing due to a lack of interest. @mpociot let me know if this is ever something you want to pursue in the future.