65 lines
2.6 KiB
PHP
65 lines
2.6 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\ProfileController;
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\SantriController;
|
|
use App\Http\Controllers\PaymentTypeController;
|
|
use App\Http\Controllers\PaymentController;
|
|
use App\Http\Controllers\HomeController;
|
|
use Inertia\Inertia;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
*/
|
|
|
|
Route::get('/', function () {
|
|
return redirect()->route('login');
|
|
});
|
|
|
|
Route::get('/login', function () {
|
|
return redirect()->route('login');
|
|
});
|
|
|
|
// Route::get('/dashboard', function () {
|
|
// return Inertia::render('Dashboard');
|
|
// })->middleware(['auth', 'verified'])->name('dashboard');
|
|
|
|
Route::middleware('auth')->group(function () {
|
|
// dashboard
|
|
Route::get('/dashboard', [HomeController::class, 'index'])->name('dashboard');
|
|
// profile
|
|
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
|
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
|
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
|
|
|
// santri
|
|
Route::get('/data-santri', [SantriController::class, 'index'])->name('indexSantri');
|
|
Route::post('/addusers', [SantriController::class, 'store'])->name('storeSantri');
|
|
Route::post('/updateusers/{id}', [SantriController::class, 'update'])->name('updateSantri');
|
|
Route::post('/deleteusers/{id}', [SantriController::class, 'destroy'])->name('deleteSantri');
|
|
|
|
// payment type
|
|
Route::get('/data-payment-type', [PaymentTypeController::class, 'index'])->name('indexPaymentType');
|
|
Route::post('/addpayment_types', [PaymentTypeController::class, 'store'])->name('storePaymentType');
|
|
Route::post('/updatepayment_types/{id}', [PaymentTypeController::class, 'update'])->name('updatePaymentType');
|
|
Route::post('/deletepayment_types/{id}', [PaymentTypeController::class, 'destroy'])->name('deletePaymentType');
|
|
|
|
// manual payment
|
|
Route::get('/index-manual-payment', [PaymentController::class, 'indexManualPayment'])->name('indexManualPayment');
|
|
Route::post('/updatepayments/{paymentId}', [PaymentController::class, 'manualPayment'])->name('manualPayment');
|
|
|
|
Route::get('profile-settings', function () {
|
|
return Inertia::render('ProfileSettings');
|
|
});
|
|
});
|
|
|
|
require __DIR__ . '/auth.php';
|