Skip to content

Instantly share code, notes, and snippets.

@simonhamp
Created December 5, 2023 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonhamp/146dbd47be1dc9bdbf5deed67374dfac to your computer and use it in GitHub Desktop.
Save simonhamp/146dbd47be1dc9bdbf5deed67374dfac to your computer and use it in GitHub Desktop.
A trait to reroute Laravel Notifications at runtime
<?php
namespace App\Concerns\Notifications;
trait Reroutable
{
protected array $routes;
public function routes(string ...$routes): static
{
$this->routes = $routes;
return $this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment