Skip to content

Instantly share code, notes, and snippets.

@danmrichards
Created September 4, 2017 18:57
Show Gist options
  • Save danmrichards/48e389119c5c35bccbcb078f286b2dc5 to your computer and use it in GitHub Desktop.
Save danmrichards/48e389119c5c35bccbcb078f286b2dc5 to your computer and use it in GitHub Desktop.
$app->get('/test', function () use ($app) {
$orders = \App\Models\Order::with('lineItems', 'payments', 'payments.metaData', 'totals', 'metaData')->get();
foreach ($orders as $order) {
print "Spoofing order:" . $order->order_number . "\r\n";
event(new \App\Events\OrderCreated($order));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment