mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
77 - Stubbing the Interface
This commit is contained in:
@@ -11,6 +11,7 @@ class Order extends Model
|
||||
public static function forTickets($tickets, $email, $amount)
|
||||
{
|
||||
$order = self::create([
|
||||
'confirmation_number' => app(OrderConfirmationNumberGenerator::class)->generate(),
|
||||
'email' => $email,
|
||||
'amount' => $amount,
|
||||
]);
|
||||
|
||||
8
app/OrderConfirmationNumberGenerator.php
Normal file
8
app/OrderConfirmationNumberGenerator.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
interface OrderConfirmationNumberGenerator
|
||||
{
|
||||
public function generate();
|
||||
}
|
||||
Reference in New Issue
Block a user