Route Resource

 avatar
user_3285855
php
6 months ago
976 B
1
Indexable
Never
<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\KategoriController;
use App\Http\Controllers\KeuanganController;
use App\Http\Controllers\PenggunaController;

/*
|--------------------------------------------------------------------------
| 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('/', function () {
    return redirect('/dashboard');
});

Auth::routes();

Route::middleware(['auth'])
->group(function(){
    Route::get('/dashboard', function () {
        return view('dashboard.index');
    });

    Route::resource('keuangan', KeuanganController::class);
    Route::resource('kategori', KategoriController::class);
    Route::resource('pengguna', PenggunaController::class);
});
Leave a Comment