logika login
This commit is contained in:
parent
ead788c490
commit
4499705910
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('admin.login');
|
||||
}
|
||||
|
||||
public function process(Request $request)
|
||||
{
|
||||
$credentials = $request->validate([
|
||||
'username' => 'required',
|
||||
'password' => 'required'
|
||||
]);
|
||||
|
||||
if (Auth::attempt($credentials)) {
|
||||
$request->session()->regenerate();
|
||||
|
||||
// pastikan admin
|
||||
if (Auth::user()->role !== 'admin') {
|
||||
Auth::logout();
|
||||
return back()->with('error', 'Anda bukan admin');
|
||||
}
|
||||
|
||||
return redirect()->route('admin.dashboard');
|
||||
}
|
||||
|
||||
return back()->with('error', 'Username atau password salah');
|
||||
}
|
||||
|
||||
public function logout(Request $request)
|
||||
{
|
||||
Auth::logout();
|
||||
$request->session()->invalidate();
|
||||
$request->session()->regenerateToken();
|
||||
|
||||
return redirect()->route('admin.login');
|
||||
}
|
||||
}
|
||||
|
|
@ -17,4 +17,9 @@ public function create()
|
|||
$title = 'Tambah Tps Admin';
|
||||
return view('admin.tps.create', compact('title'));
|
||||
}
|
||||
public function edit()
|
||||
{
|
||||
$title = 'Edit Tps Admin';
|
||||
return view('admin.tps.edit', compact('title'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AduanTps extends Model
|
||||
{
|
||||
protected $table = 'aduan_tps';
|
||||
|
||||
protected $fillable = [
|
||||
'lokasi_tps_id',
|
||||
'nama_pelapor',
|
||||
'no_pelapor',
|
||||
'isi_aduan',
|
||||
'tanggal_aduan',
|
||||
'bukti_foto'
|
||||
];
|
||||
|
||||
public function lokasiTps()
|
||||
{
|
||||
return $this->belongsTo(LokasiTps::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class KategoriTps extends Model
|
||||
{
|
||||
protected $table = 'kategori_tps';
|
||||
|
||||
protected $fillable = ['nama_kategori', 'deskripsi'];
|
||||
|
||||
public function lokasiTps()
|
||||
{
|
||||
return $this->hasMany(LokasiTps::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LokasiTps extends Model
|
||||
{
|
||||
protected $table = 'lokasi_tps';
|
||||
|
||||
protected $fillable = [
|
||||
'kategori_tps_id',
|
||||
'nama_tps',
|
||||
'status_tps',
|
||||
'tahun_pembuatan',
|
||||
'kapasitas_tps',
|
||||
'latitude',
|
||||
'longitude',
|
||||
'foto_tps'
|
||||
];
|
||||
|
||||
public function kategori()
|
||||
{
|
||||
return $this->belongsTo(KategoriTps::class, 'kategori_tps_id');
|
||||
}
|
||||
|
||||
public function aduan()
|
||||
{
|
||||
return $this->hasMany(AduanTps::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Sampah extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
@ -2,47 +2,24 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
use Notifiable;
|
||||
|
||||
protected $table = 'users';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'username',
|
||||
'password',
|
||||
'role'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
|
||||
Schema::create('job_batches', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
$table->integer('pending_jobs');
|
||||
$table->integer('failed_jobs');
|
||||
$table->longText('failed_job_ids');
|
||||
$table->mediumText('options')->nullable();
|
||||
$table->integer('cancelled_at')->nullable();
|
||||
$table->integer('created_at');
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
Schema::dropIfExists('job_batches');
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('username')->unique();
|
||||
$table->string('password');
|
||||
$table->string('role')->default('admin');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('kategori_tps', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('nama_kategori');
|
||||
$table->text('deskripsi')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('kategori_tps');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('lokasi_tps', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('kategori_tps_id')
|
||||
->constrained('kategori_tps')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('nama_tps');
|
||||
$table->string('status_tps');
|
||||
$table->year('tahun_pembuatan');
|
||||
$table->integer('kapasitas_tps');
|
||||
|
||||
$table->decimal('latitude', 10, 7);
|
||||
$table->decimal('longitude', 10, 7);
|
||||
|
||||
$table->string('foto_tps')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('lokasi_tps');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sampah', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('user_id')
|
||||
->constrained('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->year('tahun');
|
||||
$table->double('total_sampah');
|
||||
$table->double('total_kelola');
|
||||
$table->double('total_daur_ulang');
|
||||
$table->double('sisa_sampah');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sampah');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('aduan_tps', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('lokasi_tps_id')
|
||||
->constrained('lokasi_tps')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('nama_pelapor');
|
||||
$table->string('no_pelapor');
|
||||
$table->text('isi_aduan');
|
||||
$table->date('tanggal_aduan');
|
||||
$table->string('bukti_foto')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('aduan_tps');
|
||||
}
|
||||
};
|
||||
|
|
@ -11,22 +11,6 @@
|
|||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
|
|
@ -42,8 +26,6 @@ public function up(): void
|
|||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Skydash Admin</title>
|
||||
<!-- plugins:css -->
|
||||
<link rel="stylesheet" href="{{ asset('assets/admin/vendors/feather/feather.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/admin/vendors/ti-icons/css/themify-icons.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/admin/vendors/css/vendor.bundle.base.css') }}">
|
||||
<!-- endinject -->
|
||||
<!-- Plugin css for this page -->
|
||||
<!-- End plugin css for this page -->
|
||||
<!-- inject:css -->
|
||||
<link rel="stylesheet" href="{{ asset('assets/admin/css/vertical-layout-light/style.css') }}">
|
||||
<!-- endinject -->
|
||||
<link rel="shortcut icon" href="{{ asset('assets/admin/images/favicon.png') }}" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-scroller">
|
||||
<div class="container-fluid page-body-wrapper full-page-wrapper">
|
||||
<div class="content-wrapper d-flex align-items-center auth px-0">
|
||||
<div class="row w-100 mx-0">
|
||||
<div class="col-lg-4 mx-auto">
|
||||
<div class="auth-form-light text-left py-5 px-4 px-sm-5">
|
||||
<div class="brand-logo">
|
||||
<img src="{{ asset('assets/admin/images/logo.svg') }}" alt="logo">
|
||||
</div>
|
||||
<h4>Halo Admin!</h4>
|
||||
<h6 class="font-weight-light">Silakan masuk untuk melanjutkan.</h6>
|
||||
<form class="pt-3" method="POST" action="{{ route('admin.login.process') }}">
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control form-control-lg" name="username"
|
||||
placeholder="Username" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="password" class="form-control form-control-lg" name="password"
|
||||
placeholder="Password" required>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="submit"
|
||||
class="btn btn-block btn-primary btn-lg font-weight-medium auth-form-btn">
|
||||
MASUK
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (session('error'))
|
||||
<div class="alert alert-danger mt-3">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content-wrapper ends -->
|
||||
</div>
|
||||
<!-- page-body-wrapper ends -->
|
||||
</div>
|
||||
<!-- container-scroller -->
|
||||
<!-- plugins:js -->
|
||||
<script src="{{ asset('assets/admin/vendors/js/vendor.bundle.base.js') }}"></script>
|
||||
<!-- endinject -->
|
||||
<!-- Plugin js for this page -->
|
||||
<!-- End plugin js for this page -->
|
||||
<!-- inject:js -->
|
||||
<script src="{{ asset('assets/admin/js/off-canvas.js') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/hoverable-collapse.js') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/template.js') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/settings.js') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/todolist.js') }}"></script>
|
||||
<!-- endinject -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -6,21 +6,16 @@
|
|||
<div class="col-lg-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<!-- Header card: Judul kiri, tombol kanan -->
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h4 class="card-title mb-0">Basic Table</h4>
|
||||
<h4 class="card-title mb-0">Tambah TPS</h4>
|
||||
<p class="card-description mb-0">
|
||||
Add class <code>.table</code>
|
||||
Form tambah data Tempat Pengelolaan Sampah (TPS)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<a href="{{ route('admin.tps.create') }}" class="btn btn-primary">
|
||||
<i class="bi bi-plus-lg"></i> Tambah
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Tabel -->
|
||||
|
|
@ -28,7 +23,7 @@
|
|||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Profile</th>
|
||||
<th>Nama</th>
|
||||
<th>VatNo.</th>
|
||||
<th>Created</th>
|
||||
<th>Status</th>
|
||||
|
|
@ -42,7 +37,7 @@
|
|||
<td>12 May 2017</td>
|
||||
<td><label class="badge badge-danger">Pending</label></td>
|
||||
<td class="text-center">
|
||||
<a href="#" class="btn btn-warning btn-sm me-1" title="Edit">
|
||||
<a href="{{ route('admin.tps.edit') }}" class="btn btn-warning btn-sm me-1" title="Edit">
|
||||
<i class="bi bi-pencil-square"></i>
|
||||
</a>
|
||||
<a href="#" class="btn btn-danger btn-sm" title="Hapus"
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<i class="mobile-nav-toggle d-xl-none bi bi-list"></i>
|
||||
</nav>
|
||||
|
||||
<a class="btn-getstarted" href="index.html#about">Login</a>
|
||||
<a class="btn-getstarted" href="{{ route('admin.login') }}">Masuk</a>
|
||||
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
use App\Http\Controllers\SigController;
|
||||
use App\Http\Controllers\AboutController;
|
||||
use App\Http\Controllers\Admin\DashboardController as AdminDashboardController;
|
||||
use App\Http\Controllers\Admin\DashboardController;
|
||||
use App\Http\Controllers\Admin\LoginController;
|
||||
use App\Http\Controllers\Admin\TpsController;
|
||||
use App\Http\Controllers\IndexController;
|
||||
use App\Http\Controllers\AduanController;
|
||||
|
|
@ -19,9 +20,28 @@
|
|||
Route::get('/aduan-tps', [AduanController::class, 'index'])->name('user.aduan-tps');
|
||||
Route::get('/kontak', [KontakController::class, 'index'])->name('user.kontak');
|
||||
|
||||
Route::get('/dashboard', [AdminDashboardController::class, 'index'])->name('admin.dashboard');
|
||||
// Route::get('/dashboard', [DashboardController::class, 'index'])->name('admin.dashboard');
|
||||
Route::get('/tps-admin', [TpsController::class, 'index'])->name('admin.tps');
|
||||
Route::get('/tps-admin/create', [TpsController::class, 'create'])->name('admin.tps.create');
|
||||
Route::get('/tps-admin/edit', [TpsController::class, 'edit'])->name('admin.tps.edit');
|
||||
Route::get('/login', [LoginController::class, 'index'])->name('admin.login');
|
||||
Route::post('/login', [LoginController::class, 'authenticate'])->name('admin.authenticate');
|
||||
Route::post('/logout', [LoginController::class, 'logout'])->name('admin.logout');
|
||||
|
||||
Route::get('/admin/login', [LoginController::class, 'index'])
|
||||
->name('admin.login');
|
||||
|
||||
Route::post('/admin/login', [LoginController::class, 'process'])
|
||||
->name('admin.login.process');
|
||||
|
||||
Route::post('/admin/logout', [LoginController::class, 'logout'])
|
||||
->name('admin.logout');
|
||||
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/admin/dashboard', [DashboardController::class, 'index'])
|
||||
->name('admin.dashboard');
|
||||
});
|
||||
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
|
|
|
|||
Loading…
Reference in New Issue