Skip to content

Instantly share code, notes, and snippets.

@avosalmon
Created May 7, 2019 00:13
Show Gist options
  • Save avosalmon/bb773ac8ca151f6e91c7af51bac276bf to your computer and use it in GitHub Desktop.
Save avosalmon/bb773ac8ca151f6e91c7af51bac276bf to your computer and use it in GitHub Desktop.
<?php
class OrderServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->bind(OrderProcessor::class, function ($app) {
new OrderProcessor(
[
new OrderHasAmount,
new OrderIsApproved,
new OrderIsNotCancelled
],
$this->app->make(Slack::class)
);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment