134 lines
3.6 KiB
PHP
134 lines
3.6 KiB
PHP
<?php
|
|
|
|
use App\Models\RefundUser;
|
|
use App\Models\ContactUser;
|
|
use App\Models\TransactionPembeli;
|
|
use App\Models\TransactionPenjual;
|
|
use App\Http\Controllers\PembayaranController;
|
|
use App\Http\Controllers\ProfileController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider and all of them will
|
|
| be assigned to the "web" middleware group. Make something great!
|
|
|
|
|
*/
|
|
|
|
// dashboard
|
|
|
|
Route::get('/welcome', function () {
|
|
return view('welcome'
|
|
);
|
|
});
|
|
|
|
Route::get('/', function () {
|
|
return view('index',[
|
|
'name'=>'npannisa',
|
|
"TransactionPembeli"=>TransactionPembeli::HistoryTransactionPembeli()
|
|
]);
|
|
});
|
|
|
|
|
|
// contact
|
|
Route::get('/contact', function () {
|
|
return view('user/contact/contact',[
|
|
'name' => "npannisa",
|
|
"contacts"=>ContactUser::ContactUser(),
|
|
]);
|
|
});
|
|
|
|
// refund
|
|
Route::get('/refund', function () {
|
|
return view('user/refund/refund',[
|
|
'name'=>'npannisa',
|
|
"refundUserss"=>RefundUser::HistoryRefundUser()
|
|
]);
|
|
});
|
|
|
|
|
|
// transaction
|
|
|
|
Route::get('/pembeli', function () {
|
|
return view('user/transaction/Pembeli/transaction-pembeli',[
|
|
'name'=>'npannisa',
|
|
"TransactionPembeli"=>TransactionPembeli::HistoryTransactionPembeli()
|
|
]);
|
|
});
|
|
|
|
Route::get('/detail-transaction', function () {
|
|
return view('user/transaction/Pembeli/detail-transaction',[
|
|
'name'=>'npannisa',
|
|
"TransactionPembeli"=>TransactionPembeli::HistoryTransactionPembeli()
|
|
]);
|
|
});
|
|
|
|
Route::get('/refund-transaction', function () {
|
|
return view('user/transaction/Pembeli/refund-transaction',[
|
|
'name'=>'npannisa',
|
|
"TransactionPembeli"=>TransactionPembeli::HistoryTransactionPembeli()
|
|
]);
|
|
});
|
|
|
|
|
|
Route::get('/new-transaction', function () {
|
|
return view('user/transaction/Pembeli/new-transaction',[
|
|
'name'=>'npannisa',
|
|
"TransactionPembeli"=>TransactionPembeli::HistoryTransactionPembeli()
|
|
]);
|
|
});
|
|
|
|
|
|
Route::get('/penjual', function () {
|
|
return view('user/transaction/Penjual/transaction-penjual',[
|
|
'name'=>'npannisa',
|
|
"TransactionPenjual"=>TransactionPenjual::HistoryTransactionPenjual()
|
|
]);
|
|
});
|
|
|
|
Route::get('/invoice-transaction', function () {
|
|
return view('user/transaction/Pembeli/invoice-transaction',[
|
|
'name'=>'npannisa',
|
|
"TransactionPembeli"=>TransactionPembeli::HistoryTransactionPembeli()
|
|
]);
|
|
});
|
|
|
|
// percobaan midtrans untuk payment
|
|
// Route::get('/bayar-transaction', [pembayaranController::class, 'index']);
|
|
|
|
|
|
// profile
|
|
Route::get('/profile', function () {
|
|
return view('user/profile/index',[
|
|
'name'=>'npannisa',
|
|
]);
|
|
});
|
|
|
|
Route::post('/profile', [ProfileController::class,'updateProfile']);
|
|
|
|
// Route::middleware(['web'])->group(function () {
|
|
// ... Rute lain di sini ...
|
|
// Route::post('/profile', 'ProfileController@updateProfile');
|
|
// });
|
|
Route::get('/profile/edit', [ProfileController::class, 'showEditForm'])->name('profile.edit');
|
|
Route::post('/profile/edit', [ProfileController::class, 'updateProfile']);
|
|
|
|
|
|
// controller
|
|
// Route::get('/refund/create', 'RefundController@create');
|
|
// Route::post('/refund', 'RefundController@store');
|
|
// Route::get('/refund/{id}', 'RefundController@show');
|
|
// Route::delete('/refund/{id}', 'RefundController@destroy');
|
|
// routes/web.php
|
|
Route::post('/refund/create', 'RefundController@create')->name('refund.create');
|
|
|
|
|
|
|
|
|
|
|
|
|