137 lines
4.6 KiB
PHP
137 lines
4.6 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Models\Refunds;
|
|
use App\Models\Transactions;
|
|
use App\Http\Controllers\Admin\AdminRefundController;
|
|
use App\Http\Controllers\Admin\AdminUserController;
|
|
use App\Http\Controllers\Admin\AdminSettingController;
|
|
use App\Http\Controllers\Admin\AdminTransactionController;
|
|
use App\Http\Controllers\Login\LoginController;
|
|
|
|
// use Illuminate\Foundation\Auth\User;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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!
|
|
|
|
|
*/
|
|
Route::get('/welcome', function () {
|
|
return view('welcome'
|
|
);
|
|
});
|
|
Route::get('/', function () {
|
|
return view('admin.index',[
|
|
'name'=>'Jilhan Haura',
|
|
"transaction"=>Transactions::allTransactions()
|
|
]);
|
|
})->name('index');
|
|
Route::get('/detail_transaction', function () {
|
|
return view('admin/transaction/detail-transaction',[
|
|
'name'=>'Jilhn Haura',
|
|
'detail_transaction' => Transactions::allDetailTransactions()
|
|
]);
|
|
})->name('transaction.detail');
|
|
// Route::get('/history_transaction', function () {
|
|
// return view('admin/transaction/History_Transaction',[
|
|
// 'name'=>'Jilhan Haura',
|
|
// "transaction"=> Transactions::allTransactions()
|
|
// ]);
|
|
// });
|
|
// Route::get('/history_refund', function () {
|
|
// return view('admin/refund/history-refund',[
|
|
// 'name'=>'Jilhan Haura',
|
|
// "history_refund" => Refunds::HistoryRefund()
|
|
// ]);
|
|
// });
|
|
// Route::get('/refund',[RefundController::class,'index']);
|
|
|
|
|
|
|
|
Route::get('/detail_refund',function() {
|
|
return view('admin/refund/detail-refund',[
|
|
'name'=>'Jilhan Haura',
|
|
"detail_refund"=> Refunds::DetailRefund()
|
|
]);
|
|
})->name('refund.detail');
|
|
Route::get('/next_detail_refund',function() {
|
|
return view('admin/refund/next-detail-refund',[
|
|
'name'=>"Jilhan Haura"
|
|
]);
|
|
});
|
|
// Route::get('/list_user',function() {
|
|
// return view('Admin/users/list-user',[
|
|
// 'name'=>"Jilhan Haura",
|
|
// "list_users" => Users::listUsers()
|
|
// ]);
|
|
// });
|
|
// Route::get('/detail-user',function() {
|
|
// return view('Admin/users/detail-user',[
|
|
// 'name'=>"Jilhan Haura",
|
|
// "detail_user" => Users::detailUser()
|
|
// ]);
|
|
// });
|
|
Route::get('/profile',function() {
|
|
return view('admin/profile/index',[
|
|
'name'=>"Jilhan Haura",
|
|
]);
|
|
});
|
|
// Route::get('/setting',function() {
|
|
// return view('admin/setting/index',[
|
|
// 'name'=>"Jilhan Haura",
|
|
// "setting" => Settings:: HistorySetting()
|
|
// ]);
|
|
// });
|
|
|
|
// --------------------------------------------------------------------------------------------
|
|
|
|
// Route::get('/Ini', function () {
|
|
// return view('user/index',[
|
|
// 'name'=>'Jilhan Haura',
|
|
// "transaction"=>Transactions::allTransactions()
|
|
// ]);
|
|
// });
|
|
|
|
|
|
Route::resource('/login',LoginController::class);
|
|
|
|
|
|
|
|
// Login, logout dan register
|
|
|
|
|
|
// admin dan user
|
|
// Route::middleware(['auth'])->group(function(){
|
|
Route::prefix('admin')->group(function(){
|
|
// Tampilan dashboard admin beserta perhitungan
|
|
// Tampilan, aprove atau deny dan hapus user
|
|
// Route::resource('admin-user', AdminUserController::class);
|
|
Route::controller(AdminUserController::class)->group(function(){
|
|
Route::get('admin-user','index')->name('admin-user.index');
|
|
Route::get('admin-user/{id}','show')->name('admin-user.show');
|
|
Route::delete('admin-user/{id}','delete')->name('admin-user.destroy');
|
|
Route::put('admin-user/approve-user/{id}', 'approveUser')->name('admin-user.approve');
|
|
Route::put('admin-user/deny-user/{id}', 'denyUser')->name('admin-user.deny');
|
|
});
|
|
// Tampilan transaksi
|
|
Route::resource('admin-transaction', AdminTransactionController::class);
|
|
// Tampilan, approve atau deny dan hapus refund
|
|
Route::resource('admin-refund',AdminRefundController::class);
|
|
// Tampilan, tambah, ubah dan hapus kebijakan persentase perusahaan
|
|
Route::resource('admin-setting',AdminSettingController::class);
|
|
});
|
|
Route::prefix('user')->group(function(){
|
|
// Tampilan dashboard user beserta perhitungan
|
|
// Tampilan, tambah dan hapus kontak
|
|
// Tampilan transaksi, bayar, update status pengiriman dan refund
|
|
// Tampilan refund
|
|
// Tampilan
|
|
// Route::resource('user', UserController::class);
|
|
});
|
|
// });
|