laravel / valet

A more enjoyable local development experience for Mac.
https://laravel.com/docs/valet
MIT License
2.49k stars 691 forks source link

WIP: Merge Herd fork back in #1435

Closed mattstauffer closed 1 month ago

mattstauffer commented 11 months ago
mattstauffer commented 11 months 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"
);
mattstauffer commented 1 month ago

Closing due to a lack of interest. @mpociot let me know if this is ever something you want to pursue in the future.