Update checkout, enable editing of checkout, show details on invoices

This commit is contained in:
Deon George
2022-07-29 16:06:19 +10:00
parent 4f7a27dd8d
commit 39ded93a42
17 changed files with 434 additions and 52 deletions

View File

@@ -6,6 +6,7 @@ use App\Http\Controllers\{AdminController,
Auth\SocialLoginController,
CheckoutController,
HomeController,
InvoiceController,
MediaController,
OrderController,
PaypalController,
@@ -60,6 +61,13 @@ Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'pref
// Site Setup
Route::match(['get','post'],'setup',[AdminController::class,'setup']);
// Checkout Setup (Payments)
Route::get('checkout',[CheckoutController::class,'home']);
Route::get('checkout/{o?}',[CheckoutController::class,'view'])
->where('o','[0-9]+');
Route::post('checkout/{o?}',[CheckoutController::class,'addedit'])
->where('o','[0-9]+');
// Product Setup
Route::match(['get'],'product',[ProductController::class,'home']);
Route::match(['get','post'],'product/details/{o?}',[ProductController::class,'details'])
@@ -140,10 +148,10 @@ Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'],function
// ->where('o','[0-9]+')
// ->middleware('can:view,o');
Route::post('checkout/pay',[CheckoutController::class,'pay']);
Route::get('invoice/{o}',[HomeController::class,'invoice'])
Route::get('invoice/{o}',[InvoiceController::class,'view'])
->where('o','[0-9]+')
->middleware('can:view,o');
Route::get('invoice/{o}/pdf',[HomeController::class,'invoice_pdf'])
Route::get('invoice/{o}/pdf',[InvoiceController::class,'pdf'])
->where('o','[0-9]+')
->middleware('can:view,o');
Route::get('invoice/cart',[CheckoutController::class,'cart_invoice']);