mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-04 08:48:35 +00:00
93 - Wiring It All Together
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\TicketCodeGenerator;
|
||||
use App\Billing\PaymentGateway;
|
||||
use App\HashidsTicketCodeGenerator;
|
||||
use App\Billing\StripePaymentGateway;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use App\OrderConfirmationNumberGenerator;
|
||||
@@ -31,7 +33,12 @@ class AppServiceProvider extends ServiceProvider
|
||||
return new StripePaymentGateway(config('services.stripe.secret'));
|
||||
});
|
||||
|
||||
$this->app->bind(HashidsTicketCodeGenerator::class, function () {
|
||||
return new HashidsTicketCodeGenerator(config('app.ticket_code_salt'));
|
||||
});
|
||||
|
||||
$this->app->bind(PaymentGateway::class, StripePaymentGateway::class);
|
||||
$this->app->bind(OrderConfirmationNumberGenerator::class, RandomOrderConfirmationNumberGenerator::class);
|
||||
$this->app->bind(TicketCodeGenerator::class, HashidsTicketCodeGenerator::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user