diff --git a/resources/views/adminpage/add_cars.blade.php b/resources/views/adminpage/add_cars.blade.php
index 851e52d..0899d65 100644
--- a/resources/views/adminpage/add_cars.blade.php
+++ b/resources/views/adminpage/add_cars.blade.php
@@ -75,54 +75,100 @@ function confirmSubmission() {
{!! Form::label('merk', 'Merk:') !!}
- {!! Form::text('merk', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex: Toyota']) !!}
+ {!! Form::text('merk', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex: Toyota',
+ ]) !!}
{!! Form::label('model', 'Model:') !!}
- {!! Form::text('model', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex: Avanza Veloz']) !!}
+ {!! Form::text('model', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex: Avanza Veloz',
+ ]) !!}
{!! Form::label('tahun_pembuatan', 'Tahun Pembuatan:') !!}
- {!! Form::number('tahun_pembuatan', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex: 2020']) !!}
+ {!! Form::number('tahun_pembuatan', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex: 2020',
+ ]) !!}
{!! Form::label('kondisi', 'Kondisi:') !!}
- {!! Form::select('kondisi', ['Baru' => 'Baru', 'Bekas' => 'Bekas'], null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Baru/Bekas']) !!}
+ {!! Form::select('kondisi', ['Baru' => 'Baru', 'Bekas' => 'Bekas'], null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'Baru/Bekas',
+ ]) !!}
{!! Form::label('bahan_bakar', 'Bahan Bakar:') !!}
- {!! Form::select('bahan_bakar', ['Bensin (Gasoline)' => 'Bensin (Gasoline)', 'Solar (Diesel)' => 'Solar (Diesel)', 'Gas alam kendaraan (CNG)' => 'Gas alam kendaraan (CNG)', 'Listrik (Electricity)' => 'Listrik (Electricity)'], null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Bensin/Solar/CNG/Listrik']) !!}
+ {!! Form::select(
+ 'bahan_bakar',
+ [
+ 'Bensin (Gasoline)' => 'Bensin (Gasoline)',
+ 'Solar (Diesel)' => 'Solar (Diesel)',
+ 'Gas alam kendaraan (CNG)' => 'Gas alam kendaraan (CNG)',
+ 'Listrik (Electricity)' => 'Listrik (Electricity)',
+ ],
+ null,
+ ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Bensin/Solar/CNG/Listrik'],
+ ) !!}
{!! Form::label('transmisi', 'Transmisi:') !!}
- {!! Form::select('transmisi', ['Matic' => 'Matic', 'Manual' => 'Manual'], null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Manual/Matic']) !!}
+ {!! Form::select('transmisi', ['Matic' => 'Matic', 'Manual' => 'Manual'], null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'Manual/Matic',
+ ]) !!}
{!! Form::label('warna', 'Warna:') !!}
- {!! Form::text('warna', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex : Merah']) !!}
+ {!! Form::text('warna', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex : Merah',
+ ]) !!}
{!! Form::label('harga', 'Harga:') !!}
- {!! Form::number('harga', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex: 50.000.000']) !!}
+ {!! Form::text('harga', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex: 50.000.000',
+ ]) !!}
{!! Form::label('deskripsi', 'Deskripsi Tambahan (Jika tidak, isi "-" saja): ') !!}
- {!! Form::text('deskripsi', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex: km 10.000 dan warna sedikit luntur']) !!}
+ {!! Form::text('deskripsi', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex: km 10.000 dan warna sedikit luntur',
+ ]) !!}
{!! Form::label('kontak_penjual', 'Kontak Penjual (WA):') !!}
- {!! Form::text('kontak_penjual', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'ex : 08xxxxxxx']) !!}
+ {!! Form::text('kontak_penjual', null, [
+ 'class' => 'form-control',
+ 'required' => 'required',
+ 'placeholder' => 'ex : 08xxxxxxx',
+ ]) !!}
@@ -146,6 +192,4 @@ function confirmSubmission() {
});
-
-
-@endsection
\ No newline at end of file
+@endsection
diff --git a/resources/views/adminpage/edit.blade.php b/resources/views/adminpage/edit.blade.php
index 54d71e8..0005faf 100644
--- a/resources/views/adminpage/edit.blade.php
+++ b/resources/views/adminpage/edit.blade.php
@@ -100,8 +100,8 @@ class="form-control" required>
-
+
@@ -109,8 +109,8 @@ class="form-control" required>
-
+
diff --git a/routes/web.php b/routes/web.php
index b8780b4..cc02b18 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -36,12 +36,10 @@
Route::resource('/home/admin', App\Http\Controllers\Auth\AdminController::class)->middleware(['user', 'fireauth']);
Route::middleware(['auth', 'fireauth'])->group(function () {
- Route::get('/home/dashboard', function () {
- return view('adminpage.dashboard');
- })->name('dashboard');
-
Route::get('/home/cars', [App\Http\Controllers\Firebase\CarsController::class, 'index'])->name('cars');
- Route::get('/home/cars/view_cars', [App\Http\Controllers\Firebase\CarsController::class, 'index'])->name('view_cars');
+ Route::get('/home/cars/add_cars', function () {
+ return view('adminpage.add_cars');
+ })->name('add_cars');
Route::post('/home/cars/add_cars', [App\Http\Controllers\Firebase\CarsController::class, 'store'])->name('add_cars');
Route::delete('/home/cars/delete_cars/{id}', [App\Http\Controllers\Firebase\CarsController::class, 'delete_cars'])->name('delete_cars');