detail + init storage image
This commit is contained in:
parent
fcf4423d98
commit
742d89334c
|
@ -0,0 +1,64 @@
|
||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_TIMEZONE=UTC
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
APP_LOCALE=en
|
||||||
|
APP_FALLBACK_LOCALE=en
|
||||||
|
APP_FAKER_LOCALE=en_US
|
||||||
|
|
||||||
|
APP_MAINTENANCE_DRIVER=file
|
||||||
|
# APP_MAINTENANCE_STORE=database
|
||||||
|
|
||||||
|
BCRYPT_ROUNDS=12
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
LOG_STACK=single
|
||||||
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
|
DB_CONNECTION=sqlite
|
||||||
|
# DB_HOST=127.0.0.1
|
||||||
|
# DB_PORT=3306
|
||||||
|
# DB_DATABASE=laravel
|
||||||
|
# DB_USERNAME=root
|
||||||
|
# DB_PASSWORD=
|
||||||
|
|
||||||
|
SESSION_DRIVER=database
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
SESSION_ENCRYPT=false
|
||||||
|
SESSION_PATH=/
|
||||||
|
SESSION_DOMAIN=null
|
||||||
|
|
||||||
|
BROADCAST_CONNECTION=log
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
QUEUE_CONNECTION=database
|
||||||
|
|
||||||
|
CACHE_STORE=database
|
||||||
|
CACHE_PREFIX=
|
||||||
|
|
||||||
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|
||||||
|
REDIS_CLIENT=phpredis
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_MAILER=log
|
||||||
|
MAIL_HOST=127.0.0.1
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
|
VITE_APP_NAME="${APP_NAME}"
|
|
@ -36,29 +36,4 @@ public function destroy(string $id)
|
||||||
return redirect()->route('admin.dataKursus')->with('success', 'Data berhasil dihapus.');
|
return redirect()->route('admin.dataKursus')->with('success', 'Data berhasil dihapus.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PENGUNJUNG
|
|
||||||
public function home()
|
|
||||||
{
|
|
||||||
$landingpage = DataKursus::inRandomOrder()->limit(3)->get();
|
|
||||||
return view('user.home', compact('landingpage'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function kursus()
|
|
||||||
{
|
|
||||||
$data_kursus = DataKursus::limit(6)->get();
|
|
||||||
return view('user.kursus', compact('data_kursus'));
|
|
||||||
}
|
|
||||||
public function detail()
|
|
||||||
{
|
|
||||||
return view('user.detailKursus');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function maps()
|
|
||||||
{
|
|
||||||
$latilongti = DataKursus::all();
|
|
||||||
return view('user.peta', compact('latilongti'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\DataKursus;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class PengunjungController extends Controller
|
||||||
|
{
|
||||||
|
// PENGUNJUNG
|
||||||
|
public function home()
|
||||||
|
{
|
||||||
|
$landingpage = DataKursus::inRandomOrder()->limit(3)->get();
|
||||||
|
return view('user.home', compact('landingpage'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function kursus()
|
||||||
|
{
|
||||||
|
$data_kursus = DataKursus::limit(6)->get();
|
||||||
|
return view('user.kursus', compact('data_kursus'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function detail(string $id)
|
||||||
|
{
|
||||||
|
$data = DataKursus::find($id);
|
||||||
|
// dd($data);
|
||||||
|
$imageNames = json_decode($data->img_konten, true);
|
||||||
|
return view('user.detailKursus', compact(['data', 'imageNames']));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function maps()
|
||||||
|
{
|
||||||
|
$latilongti = DataKursus::all();
|
||||||
|
return view('user.peta', compact('latilongti'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,17 +12,18 @@
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('data_kursus', function (Blueprint $table) {
|
Schema::create('data_kursus', function (Blueprint $table) {
|
||||||
$table->id(); // Kolom id dengan auto increment
|
$table->id();
|
||||||
$table->string('nama_kursus'); // Kolom nama_kursus
|
$table->string('nama_kursus');
|
||||||
$table->string('img')->nullable(); // Kolom img (nullable jika tidak wajib diisi)
|
$table->string('img')->nullable();
|
||||||
$table->text('deskripsi'); // Kolom deskripsi
|
$table->longText('deskripsi');
|
||||||
$table->string('paket'); // Kolom paket
|
$table->string('paket');
|
||||||
$table->string('metode'); // Kolom metode
|
$table->string('metode');
|
||||||
$table->text('fasilitas'); // Kolom fasilitas
|
$table->text('fasilitas');
|
||||||
$table->string('lokasi'); // Kolom lokasi
|
$table->string('lokasi');
|
||||||
$table->decimal('latitude', 10, 7); // Kolom latitude (10 digit, 7 desimal)
|
$table->decimal('latitude', 10, 7);
|
||||||
$table->decimal('longtitude', 10, 7); // Kolom longitude (10 digit, 7 desimal)
|
$table->decimal('longtitude', 10, 7);
|
||||||
$table->timestamps(); // Kolom createbed_at dan updated_at
|
$table->json('img_konten')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,37 +7,18 @@
|
||||||
<div class="container flex justify-end items-center pb-16">
|
<div class="container flex justify-end items-center pb-16">
|
||||||
<div id="default-carousel" class="relative w-full" data-carousel="slide">
|
<div id="default-carousel" class="relative w-full" data-carousel="slide">
|
||||||
<!-- Carousel wrapper -->
|
<!-- Carousel wrapper -->
|
||||||
<div class="relative h-48 sm:h-[250px] md:h-[350px] lg:h-[450px] xl:h-[500px] 2xl:h-[600px] overflow-hidden rounded-lg"> <!-- Increased height -->
|
<div class="relative h-48 sm:h-[250px] md:h-[350px] lg:h-[450px] xl:h-[500px] 2xl:h-[600px] overflow-hidden rounded-lg">
|
||||||
<!-- Item 1 -->
|
@foreach ($imageNames as $index => $imageName)
|
||||||
<div class="hidden duration-700 ease-in-out h-full" data-carousel-item>
|
<!-- Item {{ $index + 1 }} -->
|
||||||
<img src="{{ asset('img/Rectangle 227.png') }}"
|
<div class="{{ $index === 0 ? 'block' : 'hidden' }} duration-700 ease-in-out h-full" data-carousel-item>
|
||||||
|
<img src="{{ asset('storage/logo/' . $imageName) }}"
|
||||||
class="absolute block w-full h-full object-cover -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
class="absolute block w-full h-full object-cover -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
||||||
alt="...">
|
alt="...">
|
||||||
</div>
|
</div>
|
||||||
<!-- Item 2 -->
|
@endforeach
|
||||||
<div class="hidden duration-700 ease-in-out h-full" data-carousel-item>
|
|
||||||
<img src="{{ asset('img/Rectangle 227.png') }}"
|
|
||||||
class="absolute block w-full h-full object-cover -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
|
||||||
alt="...">
|
|
||||||
</div>
|
|
||||||
<!-- Item 3 -->
|
|
||||||
<div class="hidden duration-700 ease-in-out h-full" data-carousel-item>
|
|
||||||
<img src="{{ asset('img/Rectangle 227.png') }}"
|
|
||||||
class="absolute block w-full h-full object-cover -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
|
||||||
alt="...">
|
|
||||||
</div>
|
|
||||||
<!-- Item 4 -->
|
|
||||||
<div class="hidden duration-700 ease-in-out h-full" data-carousel-item>
|
|
||||||
<img src="{{ asset('img/Rectangle 227.png') }}"
|
|
||||||
class="absolute block w-full h-full object-cover -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
|
||||||
alt="...">
|
|
||||||
</div>
|
|
||||||
<!-- Item 5 -->
|
|
||||||
<div class="hidden duration-700 ease-in-out h-full" data-carousel-item>
|
|
||||||
<img src="{{ asset('img/Rectangle 227.png') }}"
|
|
||||||
class="absolute block w-full h-full object-cover -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
|
||||||
alt="...">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Slider indicators -->
|
<!-- Slider indicators -->
|
||||||
<div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">
|
<div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">
|
||||||
|
@ -80,90 +61,33 @@ class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/3
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
<p class="poppins-medium text-3xl text-black py-4">Kampung Inggris LC - Language Center </p>
|
<p class="poppins-medium text-3xl text-black py-4">Kampung Inggris LC - Language Center </p>
|
||||||
<button class="poppins-regular py-2 px-4 bg-[#4F7F81] text-white rounded-xl text-xl shadow-xl">Rute
|
<button class="poppins-regular py-2 px-4 bg-[#4F7F81] text-white rounded-xl text-xl shadow-xl">Rute
|
||||||
Terdekat</button>
|
Terdekat</button>
|
||||||
<p class="text-black text-lg py-4 poppins-semibold">Deskripsi</p>
|
<p class="text-black text-lg py-4 poppins-semibold">Deskripsi</p>
|
||||||
<p class="poppins-regular text-black text-2xl pb-2 max-w-7xl">KAMPUNG INGGRIS LC – LANGUAGE CENTER
|
<p class="poppins-regular text-black text-2xl pb-2 max-w-7xl">
|
||||||
Adalah salah satu lembaga kursus bahasa inggris TERBESAR dan TERFAVORIT di kampung Inggris Pare. Lebih dari
|
{{ $data->deskripsi }}
|
||||||
53.333+ alumni dari berbagai daerah di indonesia sudah merasakan metode UNIK yang terbukti membuat
|
|
||||||
mereka PUAS dan MAU merekomendasikan LC. Metode berkualitas Integrated Intensive Program, sistem belajar
|
|
||||||
yang terintegrasi dari speaking, grammar, dan pronunciation bakal mempercepat kamu mahir berbahasa Inggris.
|
|
||||||
</p>
|
</p>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-20 py-14">
|
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-20 py-14">
|
||||||
<div class="max-w-80 space-y-2">
|
<div class="max-w-80 space-y-2">
|
||||||
<p class="poppins-semibold text-2xl text-black ">
|
|
||||||
Program Pembelajaran
|
|
||||||
</p>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black underline">
|
|
||||||
English Master
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
6 Bulan Rp. 9.500.000
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
4 Bulan Rp. 6.500.000
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black underline">
|
|
||||||
Intensive
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
3 Bulan Rp. 4.200.000
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
2 Bulan Rp. 2.975.000
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
{{-- Page untuk paket --}}
|
||||||
1 Bulan Rp. 1.600.000
|
{{ strip_tags($data->paket) }}
|
||||||
</h1>
|
|
||||||
|
|
||||||
<h1 class="popins-reguler text-2xl text-black underline">
|
|
||||||
Toefl
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
1 Bulan Rp. 1.750.000
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black underline">
|
|
||||||
Holiday Ceria
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
2 Minggu Rp. 1.700.000
|
|
||||||
</h1>
|
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
|
||||||
1 Minggu Rp. 990.000
|
|
||||||
</h1>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-max space-y-2">
|
<div class="max-w-max space-y-2">
|
||||||
<p class="poppins-semibold text-2xl text-black ">
|
<p class="poppins-semibold text-2xl text-black ">
|
||||||
Metode Pembelajaran
|
Metode Pembelajaran
|
||||||
</p>
|
</p>
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
<h1 class="popins-reguler text-2xl text-black ">
|
||||||
Confidence Booster
|
{{ $data->metode }}
|
||||||
Grammar Hack
|
|
||||||
Speak Properly
|
|
||||||
Speaking Without Thinking
|
|
||||||
Conceptual Mapping Skills
|
|
||||||
English for Spesific Purpose
|
|
||||||
Critical Thinking
|
|
||||||
</h1>
|
</h1>
|
||||||
<p class="poppins-semibold text-2xl text-black pt-6">
|
<p class="poppins-semibold text-2xl text-black pt-6">
|
||||||
Fasilitas
|
Fasilitas
|
||||||
</p>
|
</p>
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
<h1 class="popins-reguler text-2xl text-black ">
|
||||||
Camp/asrama English Area
|
{{ $data->fasilitas }}
|
||||||
Assessment Test
|
|
||||||
Modul Pembelajaran
|
|
||||||
Sertifikat LC
|
|
||||||
|
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-max space-y-2">
|
<div class="max-w-max space-y-2">
|
||||||
|
@ -171,10 +95,7 @@ class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/3
|
||||||
Lokasi
|
Lokasi
|
||||||
</p>
|
</p>
|
||||||
<h1 class="popins-reguler text-2xl text-black ">
|
<h1 class="popins-reguler text-2xl text-black ">
|
||||||
Jl. Langkat No.88, Singgahan, Pelem, Kec. Pare, Kabupaten Kediri, Jawa Timur 64213
|
{{ $data->lokasi }}
|
||||||
0858-5611-1118
|
|
||||||
Instagram: @kampunginggrislc
|
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -72,7 +72,7 @@ class="absolute top-0 end-0 p-2.5 text-sm font-medium h-full text-white bg-[#4F7
|
||||||
<div class="max-w-max shadow-xl bg-white border border-gray-300 rounded-lg ">
|
<div class="max-w-max shadow-xl bg-white border border-gray-300 rounded-lg ">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img class="rounded-lg m-auto flex justify-center items-center w-full max-h-64 object-cover"
|
<img class="rounded-lg m-auto flex justify-center items-center w-full max-h-64 object-cover"
|
||||||
src="{{ asset('img/Rectangle 288.png') }}" alt="" />
|
src="{{ asset('storage/konten/'.$data_kursus->img ) }}" alt="" />
|
||||||
{{-- src="{{ asset($data_kursus->img) }}" alt="{{ $data_kursus->nama_kursus }}" /> --}}
|
{{-- src="{{ asset($data_kursus->img) }}" alt="{{ $data_kursus->nama_kursus }}" /> --}}
|
||||||
</a>
|
</a>
|
||||||
<div class="p-5">
|
<div class="p-5">
|
||||||
|
@ -117,7 +117,7 @@ class="absolute top-0 end-0 p-2.5 text-sm font-medium h-full text-white bg-[#4F7
|
||||||
<p class="ms-1 text-sm text-gray-500 ">5</p>
|
<p class="ms-1 text-sm text-gray-500 ">5</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<a href="#"
|
<a href="/kursus/{{ $data_kursus->id }}/detail"
|
||||||
class="inline-flex items-center px-6 font-extrabold py-2 text-sm text-center ring-2 text-black ring-black hover:text-white hover:bg-[#4F7F81] hover:ring-[#4F7F81] rounded-full focus:ring-4 focus:outline-none focus:ring-blue-300 -700 ue-800">
|
class="inline-flex items-center px-6 font-extrabold py-2 text-sm text-center ring-2 text-black ring-black hover:text-white hover:bg-[#4F7F81] hover:ring-[#4F7F81] rounded-full focus:ring-4 focus:outline-none focus:ring-blue-300 -700 ue-800">
|
||||||
Lihat
|
Lihat
|
||||||
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
|
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
|
||||||
|
|
|
@ -4,21 +4,20 @@
|
||||||
use App\Http\Controllers\AdminDashboardController;
|
use App\Http\Controllers\AdminDashboardController;
|
||||||
use App\Http\Controllers\AdminDataKursusController;
|
use App\Http\Controllers\AdminDataKursusController;
|
||||||
use App\Http\Controllers\LoginController;
|
use App\Http\Controllers\LoginController;
|
||||||
|
use App\Http\Controllers\PengunjungController;
|
||||||
|
|
||||||
|
|
||||||
Route::get('/admin/dashboard', [AdminDashboardController::class, 'index'])->name('admin.home');
|
Route::get('/admin/dashboard', [AdminDashboardController::class, 'index'])->name('admin.home');
|
||||||
Route::get('/admin/data-kursus', [AdminDataKursusController::class, 'dataKursus'])->name('admin.dataKursus');
|
Route::get('/admin/data-kursus', [AdminDataKursusController::class, 'dataKursus'])->name('admin.dataKursus');
|
||||||
Route::get('/admin/tambahdata', [AdminDataKursusController::class, 'create'])->name('admin.tambahDataKursus');
|
Route::get('/admin/tambahdata', [AdminDataKursusController::class, 'create'])->name('admin.tambahDataKursus');
|
||||||
|
|
||||||
Route::delete('/admin/delete/{id}', [AdminDataKursusController::class, 'destroy'])->name('delete');
|
Route::delete('/admin/delete/{id}', [AdminDataKursusController::class, 'destroy'])->name('delete');
|
||||||
|
|
||||||
Route::get('/admin/courses', [AdminDataKursusController::class, 'index']);
|
Route::get('/admin/courses', [AdminDataKursusController::class, 'index']);
|
||||||
|
|
||||||
Route::get('/login', [LoginController::class, 'index'])->name('login');
|
Route::get('/login', [LoginController::class, 'index'])->name('login');
|
||||||
|
|
||||||
Route::get('/', [AdminDataKursusController::class, 'home'])->name('home');
|
Route::get('/', [PengunjungController::class, 'home'])->name('home');
|
||||||
Route::get('/kursus', [AdminDataKursusController::class, 'kursus'])->name('user.kursus'); // Perbaikan pada rute ini
|
Route::get('/kursus', [PengunjungController::class, 'kursus'])->name('user.kursus');
|
||||||
Route::get('/peta', [AdminDataKursusController::class, 'maps'])->name('user.peta');
|
|
||||||
|
|
||||||
Route::get('/detailKursus', [AdminDataKursusController::class, 'detail'])->name('user.detailKursus');
|
Route::get('/peta', [PengunjungController::class, 'maps'])->name('user.peta');
|
||||||
|
|
||||||
|
Route::get('/kursus/{id}/detail', [PengunjungController::class, 'detail'])->name('kursus.detail');
|
||||||
|
|
Loading…
Reference in New Issue