mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-09-29 12:13:06 -04:00
36 lines
828 B
PHP
36 lines
828 B
PHP
<?php
|
|
|
|
namespace Modules\WTIALaCarte\Http\Controllers;
|
|
|
|
use Illuminate\Contracts\Support\Renderable;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Routing\Controller;
|
|
use Modules\WTIALaCarte\Services\StripeService;
|
|
use Modules\WTIALaCarte\Entities\Alacarte;
|
|
use Modules\WTIALaCarte\Entities\AlacarteOrder;
|
|
use Modules\WTIALaCarte\Entities\AlacarteOrderItem;
|
|
|
|
class ALaCarteOrderController extends Controller
|
|
{
|
|
private $stripe;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->stripe = new StripeService();
|
|
}
|
|
|
|
public function orders()
|
|
{
|
|
return view('wtialacarte::orders');
|
|
}
|
|
|
|
public function all(Request $request)
|
|
{
|
|
$orders = AlacarteOrder::with(['user','items.product'])->latest()->get();
|
|
|
|
return response()->json([
|
|
'orders' => $orders
|
|
]);
|
|
}
|
|
}
|