This commit is contained in:
Adrian Hopek
2022-04-26 12:46:18 +02:00
parent cbfc2b0c45
commit 7f5e462e4d
54 changed files with 361 additions and 211 deletions

View File

@@ -9,19 +9,19 @@ use Illuminate\Notifications\ChannelManager;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\ServiceProvider;
use Toby\Domain\Slack\Channels\SlackApiChannel;
use Toby\Infrastructure\Slack\Channels\SlackApiChannel;
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
Notification::resolved(function (ChannelManager $service): void {
$service->extend("slack", fn(Application $app) => $app->make(SlackApiChannel::class));
$service->extend("slack", fn(Application $app): SlackApiChannel => $app->make(SlackApiChannel::class));
});
}
public function boot(): void
{
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("d.m.Y"));
Carbon::macro("toDisplayString", fn(): string => $this->translatedFormat("d.m.Y"));
}
}