Rute Proses
This commit is contained in:
parent
1a84b60495
commit
b8ce40b6dd
|
@ -7,35 +7,57 @@
|
||||||
|
|
||||||
class PengunjungController extends Controller
|
class PengunjungController extends Controller
|
||||||
{
|
{
|
||||||
// PENGUNJUNG
|
// PENGUNJUNG
|
||||||
public function home()
|
public function home()
|
||||||
{
|
{
|
||||||
$landingpage = DataKursus::inRandomOrder()->limit(3)->get();
|
$landingpage = DataKursus::inRandomOrder()->limit(3)->get();
|
||||||
return view('user.home', compact('landingpage'));
|
foreach ($landingpage as $item) {
|
||||||
}
|
$item->deskripsi = \Illuminate\Support\Str::words($item->deskripsi, 26, '...');
|
||||||
|
}
|
||||||
|
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)
|
public function kursus()
|
||||||
{
|
{
|
||||||
$data = DataKursus::find($id);
|
$data_kursus = DataKursus::limit(6)->get();
|
||||||
|
foreach ($data_kursus as $item) {
|
||||||
|
$item->deskripsi = \Illuminate\Support\Str::words($item->deskripsi, 26,);
|
||||||
|
}
|
||||||
|
return view('user.kursus', compact('data_kursus'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function search(Request $request)
|
||||||
|
{
|
||||||
|
if ($request->has('search')) {
|
||||||
|
$query = $request->input('search');
|
||||||
|
$kursus = DataKursus::where('nama_kursus', 'LIKE', $query . '%')->get(); // Menampilkan hasil yang dimulai dengan input
|
||||||
|
} else {
|
||||||
|
$kursus = DataKursus::all();
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json($kursus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function detail(string $id)
|
||||||
|
{
|
||||||
|
$data = DataKursus::find($id);
|
||||||
// dd($data);
|
// dd($data);
|
||||||
$imageNames = json_decode($data->img_konten, true);
|
$imageNames = json_decode($data->img_konten, true);
|
||||||
return view('user.detailKursus', compact(['data', 'imageNames']));
|
return view('user.detailKursus', compact(['data', 'imageNames']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function maps()
|
public function maps()
|
||||||
{
|
{
|
||||||
$latilongti = DataKursus::all();
|
$latilongti = DataKursus::all();
|
||||||
return view('user.peta', compact('latilongti'));
|
return view('user.peta', compact('latilongti'));
|
||||||
}
|
}
|
||||||
|
public function rute()
|
||||||
|
{
|
||||||
|
return view('user.rute');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,10 @@ public function up()
|
||||||
$table->string('nama_kursus');
|
$table->string('nama_kursus');
|
||||||
$table->string('img')->nullable();
|
$table->string('img')->nullable();
|
||||||
$table->longText('deskripsi');
|
$table->longText('deskripsi');
|
||||||
$table->string('paket');
|
$table->longText('paket');
|
||||||
$table->string('metode');
|
$table->longText('metode');
|
||||||
$table->text('fasilitas');
|
$table->text('fasilitas');
|
||||||
$table->string('lokasi');
|
$table->longText('lokasi');
|
||||||
|
|
||||||
$table->decimal('latitude', 10, 7);
|
$table->decimal('latitude', 10, 7);
|
||||||
$table->decimal('longitude', 10, 7);
|
$table->decimal('longitude', 10, 7);
|
||||||
$table->json('img_konten')->nullable();
|
$table->json('img_konten')->nullable();
|
||||||
|
|
|
@ -3,9 +3,139 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="py-10">
|
<div class="py-10">
|
||||||
|
|
||||||
|
<div class="pb-4 flex">
|
||||||
|
|
||||||
|
<a class="px-4 flex text-white text-lg justify-center items-center py-2 rounded-xl bg-[#4F7F81]"
|
||||||
|
href="{{ route('admin.dataKursus') }}"><svg class="w-5 h-5 text-white " aria-hidden="true"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="M13 5H1m0 0 4 4M1 5l4-4" />
|
||||||
|
</svg></a>
|
||||||
|
</div>
|
||||||
|
<form action="{{ route('kursus.store') }}" method="POST" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
||||||
|
<!-- Nama Kursus -->
|
||||||
|
<div>
|
||||||
|
<label for="nama_kursus" class="block mb-2 text-sm font-medium text-gray-900">Nama
|
||||||
|
Kursus</label>
|
||||||
|
<input type="text" id="nama_kursus" name="nama_kursus"
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
|
||||||
|
placeholder="Kampung Inggris LC - Language Center" required />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- File Upload -->
|
||||||
|
<div>
|
||||||
|
<label for="file_input" class="block mb-2 text-sm font-medium text-gray-900">Upload File</label>
|
||||||
|
<div class="flex">
|
||||||
|
<input
|
||||||
|
class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50"
|
||||||
|
id="file_input" type="file" name="img">
|
||||||
|
<div class="ml-2 p-0">
|
||||||
|
<!-- Modal toggle -->
|
||||||
|
<button data-modal-target="default-modal" data-modal-toggle="default-modal"
|
||||||
|
class="block text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm py-3 text-center "
|
||||||
|
type="button">
|
||||||
|
detail
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Main modal -->
|
||||||
|
<div id="default-modal" tabindex="-1" aria-hidden="true"
|
||||||
|
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||||
|
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||||
|
<!-- Modal content -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Deskripsi -->
|
||||||
|
<div>
|
||||||
|
<label for="deskripsi" class="block mb-2 text-sm font-medium text-gray-900">Deskripsi</label>
|
||||||
|
<input type="text" id="deskripsi" name="deskripsi"
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
|
||||||
|
placeholder="KAMPUNG INGGRIS LC – LANGUAGE CENTER Adalah . . . ." required />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Multiple File Upload -->
|
||||||
|
<div>
|
||||||
|
<label for="multiple_files" class="block mb-2 text-sm font-medium text-gray-900">Upload Multiple
|
||||||
|
Files</label>
|
||||||
|
<input
|
||||||
|
class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50"
|
||||||
|
id="multiple_files" type="file" name="img_konten[]" multiple>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Latitude -->
|
||||||
|
<div>
|
||||||
|
<label for="latitude" class="block mb-2 text-sm font-medium text-gray-900">Latitude</label>
|
||||||
|
<input type="text" id="latitude" name="latitude"
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
|
||||||
|
placeholder="Latitude" required />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Longitude -->
|
||||||
|
<div>
|
||||||
|
<label for="longitude" class="block mb-2 text-sm font-medium text-gray-900">longitude</label>
|
||||||
|
<input type="text" id="longitude" name="longitude"
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
|
||||||
|
placeholder="longitude" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Paket -->
|
||||||
|
<div>
|
||||||
|
<label for="paket" class="block mb-2 text-sm font-medium text-gray-900">Paket</label>
|
||||||
|
<input id="paket" name="paket" type="hidden" />
|
||||||
|
<trix-editor input="paket"
|
||||||
|
class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500"
|
||||||
|
placeholder="Write your thoughts here..."></trix-editor>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Metode -->
|
||||||
|
<div>
|
||||||
|
<label for="metode" class="block mb-2 text-sm font-medium text-gray-900">Metode</label>
|
||||||
|
<input id="metode" name="metode" type="hidden" />
|
||||||
|
<trix-editor input="metode"
|
||||||
|
class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500"
|
||||||
|
placeholder="Write your thoughts here..."></trix-editor>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Fasilitas -->
|
||||||
|
<div>
|
||||||
|
<label for="fasilitas" class="block mb-2 text-sm font-medium text-gray-900">Fasilitas</label>
|
||||||
|
<input id="fasilitas" name="fasilitas" type="hidden" />
|
||||||
|
<trix-editor input="fasilitas"
|
||||||
|
class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500"
|
||||||
|
placeholder="Write your thoughts here..."></trix-editor>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Lokasi -->
|
||||||
|
<div>
|
||||||
|
<label for="lokasi" class="block mb-2 text-sm font-medium text-gray-900">Lokasi</label>
|
||||||
|
<input id="lokasi" name="lokasi" type="hidden" />
|
||||||
|
<trix-editor input="lokasi"
|
||||||
|
class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500"
|
||||||
|
placeholder="Write your thoughts here..."></trix-editor>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit"
|
||||||
|
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center">Submit</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@push('script')
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/1.3.1/trix.min.css">
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/trix/1.3.1/trix.min.js"></script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
|
|
||||||
</x-adminlayout>
|
</x-adminlayout>
|
||||||
|
|
|
@ -36,7 +36,7 @@ class="{{ request()->is('admin/data-kursus','admin/tambahdata') ? 'bg-[#EBFEA1]
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
@csrf
|
@csrf
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="{{ request()->is('peta') ? 'bg-[#EBFEA1] md:bg-transparent md:text-white md:underline' : 'text-gray-900' }} block py-2 px-3 md:p-0 rounded hover:bg-[#EBFEA1] md:hover:bg-transparent md:border-0 md:hover:text-white poppins-extrabold text-sm ">
|
class="{{ request()->is('peta') ? 'bg-[#EBFEA1] md:bg-transparent md:text-white md:underline' : 'text-gray-900' }} block py-2 px-3 md:p-0 rounded hover:bg-[#EBFEA1] text-red-800 md:hover:bg-transparent md:border-0 md:hover:text-white poppins-extrabold text-sm ">
|
||||||
Keluar
|
Keluar
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -58,7 +58,7 @@ class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/3
|
||||||
<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-2xl py-4 poppins-semibold">Deskripsi</p>
|
||||||
<p class="poppins-regular text-black text-2xl pb-2 max-w-7xl">
|
<p class="poppins-regular text-black text-2xl pb-2 max-w-7xl">
|
||||||
{{ $data->deskripsi }}
|
{{ $data->deskripsi }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<p class="text-black poppins-semibold">
|
<p class="text-black poppins-semibold">
|
||||||
Kursus Populer
|
Kursus Populer
|
||||||
</p>
|
</p>
|
||||||
<p class="py-1 px-4 rounded-full bg-white ">
|
<a href="/kursus" class="py-1 px-4 rounded-full bg-white ">
|
||||||
Lihat Semua Kursus
|
Lihat Semua Kursus
|
||||||
</p>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8 m-auto justify-center items-center">
|
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8 m-auto justify-center items-center">
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<div class="max-w-max bg-white border border-gray-200 rounded-lg shadow ">
|
<div class="max-w-max bg-white border border-gray-200 rounded-lg shadow ">
|
||||||
<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('storage/'.$landingpage->img ) }}" alt="" />
|
src="{{ asset('storage/' . $landingpage->img) }}" alt="" />
|
||||||
</a>
|
</a>
|
||||||
<div class="p-5">
|
<div class="p-5">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
|
@ -35,7 +35,10 @@
|
||||||
class="mb-2 text-2xl poppins-regular font-extrabold tracking-tight text-gray-900 ">
|
class="mb-2 text-2xl poppins-regular font-extrabold tracking-tight text-gray-900 ">
|
||||||
{{ $landingpage->nama_kursus }}</h5>
|
{{ $landingpage->nama_kursus }}</h5>
|
||||||
</a>
|
</a>
|
||||||
<p class="mb-3 font-normal poppins-regular text-gray-700 ">{{ $landingpage->deskripsi}}</p>
|
<p class="mb-3 font-normal poppins-regular text-gray-700">
|
||||||
|
{{ Str::words($landingpage->deskripsi, 30, '...') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
@ -96,7 +99,6 @@ class="inline-flex items-center px-6 font-extrabold py-2 text-sm text-center rin
|
||||||
Tingkatkan Kemampuan Bahasa Inggris Anda dengan LearnMap!
|
Tingkatkan Kemampuan Bahasa Inggris Anda dengan LearnMap!
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
Selamat datang di LearnMap, aplikasi website Sistem Informasi Geografis bimbingan belajar bahasa
|
Selamat datang di LearnMap, aplikasi website Sistem Informasi Geografis bimbingan belajar bahasa
|
||||||
Inggris di Kecamatan Pare, yang didirikan dengan semangat memberdayakan individu melalui
|
Inggris di Kecamatan Pare, yang didirikan dengan semangat memberdayakan individu melalui
|
||||||
pengetahuan. Kami menyediakan berbagai kursus berkualitas tinggi, metode belajar menarik, dan
|
pengetahuan. Kami menyediakan berbagai kursus berkualitas tinggi, metode belajar menarik, dan
|
||||||
|
|
|
@ -7,46 +7,13 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="flex justify-end py-4">
|
<div class="flex justify-end py-4">
|
||||||
<div class="flex space-x-2">
|
<div class="flex space-x-2">
|
||||||
|
<div class="flex">
|
||||||
|
<div class="relative w-full">
|
||||||
<form class="max-w-lg mx-auto">
|
<form action="/kursus/search" method="GET">
|
||||||
<div class="flex">
|
|
||||||
<label for="search-dropdown" class="mb-2 text-sm font-medium text-gray-900 sr-only ">Your
|
|
||||||
Email</label>
|
|
||||||
<button id="dropdown-button" data-dropdown-toggle="dropdown"
|
|
||||||
class="flex-shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg hover:bg-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 "
|
|
||||||
type="button">All categories <svg class="w-2.5 h-2.5 ms-2.5" aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
|
||||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
|
||||||
stroke-width="2" d="m1 1 4 4 4-4" />
|
|
||||||
</svg></button>
|
|
||||||
<div id="dropdown"
|
|
||||||
class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 ">
|
|
||||||
<ul class="py-2 text-sm text-gray-700 " aria-labelledby="dropdown-button">
|
|
||||||
<li>
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex w-full px-4 py-2 hover:bg-gray-100 ">Mockups</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex w-full px-4 py-2 hover:bg-gray-100 ">Templates</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex w-full px-4 py-2 hover:bg-gray-100 ">Design</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex w-full px-4 py-2 hover:bg-gray-100 ">Logos</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="relative w-full">
|
|
||||||
<input type="search" id="search-dropdown"
|
<input type="search" id="search-dropdown"
|
||||||
class="block pr-12 p-2.5 w-full z-20 text-sm text-gray-900 bg-gray-50 rounded-e-lg border-s-gray-50 border-s-2 border border-gray-300 focus:ring-blue-500 focus:border-blue-500"
|
class="block pr-12 p-2.5 w-full z-20 text-sm text-gray-900 bg-gray-50 rounded-e-lg focus:ring-blue-500 focus:border-blue-500"
|
||||||
placeholder="Search Mockups, Logos, Design Templates..." required />
|
placeholder="Pencarian Nama Kursus" required />
|
||||||
<button type="submit"
|
<div type="submit"
|
||||||
class="absolute top-0 end-0 p-2.5 text-sm font-medium h-full text-white bg-[#4F7F81] rounded-e-lg border border-[#4F7F81] hover:bg-[#4F7F81] focus:ring-4 focus:outline-none focus:ring-[#4F7F81]">
|
class="absolute top-0 end-0 p-2.5 text-sm font-medium h-full text-white bg-[#4F7F81] rounded-e-lg border border-[#4F7F81] hover:bg-[#4F7F81] focus:ring-4 focus:outline-none focus:ring-[#4F7F81]">
|
||||||
<svg class="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
<svg class="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none" viewBox="0 0 20 20">
|
fill="none" viewBox="0 0 20 20">
|
||||||
|
@ -54,74 +21,37 @@ class="absolute top-0 end-0 p-2.5 text-sm font-medium h-full text-white bg-[#4F7
|
||||||
stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" />
|
stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span class="sr-only">Search</span>
|
<span class="sr-only">Search</span>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pb-20 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8 m-auto justify-center items-center">
|
<div class="pb-20 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8 m-auto justify-center items-center">
|
||||||
@foreach ($data_kursus as $data_kursus)
|
@foreach ($data_kursus as $kursus)
|
||||||
<div class="max-w-max shadow-xl bg-white border border-gray-300 rounded-lg ">
|
<div class="max-w-sm 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 w-full max-h-64 object-cover"
|
||||||
src="{{ asset('storage/'.$data_kursus->img ) }}" alt="" />
|
src="{{ asset('storage/' . $kursus->img) }}" alt="{{ $kursus->nama_kursus }}" />
|
||||||
{{-- src="{{ asset($data_kursus->img) }}" alt="{{ $data_kursus->nama_kursus }}" /> --}}
|
|
||||||
</a>
|
</a>
|
||||||
<div class="p-5">
|
<div class="p-5">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<h5 class="mb-2 text-2xl poppins-regular font-extrabold tracking-tight text-gray-900">
|
<h5 class="mb-2 text-2xl poppins-regular font-extrabold tracking-tight text-gray-900">
|
||||||
{{ $data_kursus->nama_kursus }}
|
{{ $kursus->nama_kursus }}
|
||||||
</h5>
|
</h5>
|
||||||
</a>
|
</a>
|
||||||
<p class="mb-3 font-normal poppins-regular text-gray-700 ">
|
<p class="mb-3 font-normal poppins-regular text-gray-700">
|
||||||
{{ $data_kursus->deskripsi }}
|
{{ Str::limit($kursus->deskripsi) }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<div class="flex items-center">
|
|
||||||
<svg class="w-4 h-4 text-yellow-300 me-1" aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 20">
|
|
||||||
<path
|
|
||||||
d="M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z" />
|
|
||||||
</svg>
|
|
||||||
<svg class="w-4 h-4 text-yellow-300 me-1" aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 20">
|
|
||||||
<path
|
|
||||||
d="M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z" />
|
|
||||||
</svg>
|
|
||||||
<svg class="w-4 h-4 text-yellow-300 me-1" aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 20">
|
|
||||||
<path
|
|
||||||
d="M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z" />
|
|
||||||
</svg>
|
|
||||||
<svg class="w-4 h-4 text-yellow-300 me-1" aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 20">
|
|
||||||
<path
|
|
||||||
d="M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z" />
|
|
||||||
</svg>
|
|
||||||
<svg class="w-4 h-4 text-gray-300 me-1 " aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 20">
|
|
||||||
<path
|
|
||||||
d="M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z" />
|
|
||||||
</svg>
|
|
||||||
<p class="ms-1 text-sm text-gray-500 ">4.95</p>
|
|
||||||
<p class="ms-1 text-sm text-gray-500 ">out of</p>
|
|
||||||
<p class="ms-1 text-sm text-gray-500 ">5</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<a href="/kursus/{{ $data_kursus->id }}/detail"
|
<a href="/kursus/{{ $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 py-2 text-sm font-extrabold text-black ring-2 ring-black hover:text-white hover:bg-[#4F7F81] hover:ring-[#4F7F81] rounded-full focus:ring-4 focus:outline-none">
|
||||||
Lihat
|
Lihat
|
||||||
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
|
<svg class="w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
|
fill="none" viewBox="0 0 14 10">
|
||||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||||
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
|
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
|
||||||
</svg>
|
</svg>
|
||||||
|
@ -130,8 +60,6 @@ class="inline-flex items-center px-6 font-extrabold py-2 text-sm text-center rin
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</x-layout>
|
</x-layout>
|
||||||
|
|
|
@ -34,12 +34,10 @@ class="w-full h-56 sm:h-64 md:h-96 lg:h-[500px] xl:h-[650px] max-w-4xl rounded-l
|
||||||
{
|
{
|
||||||
coords: [{{ $latilongti->latitude }}, {{ $latilongti->longitude }}],
|
coords: [{{ $latilongti->latitude }}, {{ $latilongti->longitude }}],
|
||||||
popupText: '{{ $latilongti->nama_kursus }}',
|
popupText: '{{ $latilongti->nama_kursus }}',
|
||||||
href: '{{ route ('admin.dataKursus') }}' // Menambahkan href
|
href: '{{ route('admin.dataKursus') }}' // Menambahkan href
|
||||||
},
|
},
|
||||||
@endforeach
|
@endforeach
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
// Add markers to the map
|
// Add markers to the map
|
||||||
markers.forEach(marker => {
|
markers.forEach(marker => {
|
||||||
L.marker(marker.coords).addTo(map)
|
L.marker(marker.coords).addTo(map)
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
<x-adminlayout>
|
||||||
|
<style>
|
||||||
|
/* Set the height of the map */
|
||||||
|
#map {
|
||||||
|
/* Height will be controlled by Tailwind CSS classes */
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="container">
|
||||||
|
<div class="py-10 bg-white">
|
||||||
|
<div class="bg-[#EBFEA1] poppins-extrabold m-auto flex items-center justify-center p-2">
|
||||||
|
<p>Halaman ini berisi Rute menuju ke MANA</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pb-10">
|
||||||
|
<!-- Apply Tailwind CSS classes for responsive width and height -->
|
||||||
|
<div id="map"
|
||||||
|
class="w-full h-56 sm:h-64 md:h-96 lg:h-[500px] xl:h-[650px] max-w-4xl rounded-lg shadow-lg"></div>
|
||||||
|
|
||||||
|
<!-- Leaflet JS -->
|
||||||
|
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
|
||||||
|
<script>
|
||||||
|
// Initialize the map with default center and zoom level
|
||||||
|
const map = L.map('map').setView([-7.7523414, 112.1700522], 15); // Latitude and Longitude
|
||||||
|
|
||||||
|
// Add a tile layer from OpenStreetMap
|
||||||
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
}).addTo(map);
|
||||||
|
|
||||||
|
// Array to hold markers data from the database
|
||||||
|
const markers = [
|
||||||
|
{
|
||||||
|
coords: [,],
|
||||||
|
popupText: '#',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
// Add markers to the map
|
||||||
|
markers.forEach(marker => {
|
||||||
|
L.marker(marker.coords).addTo(map)
|
||||||
|
.bindPopup(marker.popupText);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Function to handle the successful retrieval of the user's location
|
||||||
|
function onLocationFound(e) {
|
||||||
|
// Create a custom icon for the user's location
|
||||||
|
const userIcon = L.icon({
|
||||||
|
iconUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-red.png', // Red marker icon
|
||||||
|
iconSize: [25, 41], // Size of the icon
|
||||||
|
iconAnchor: [12, 41], // Point of the icon which will correspond to marker's location
|
||||||
|
popupAnchor: [1, -34], // Point from which the popup should open relative to the iconAnchor
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add a marker for the user's location with the custom red icon
|
||||||
|
const userMarker = L.marker(e.latlng, {
|
||||||
|
icon: userIcon
|
||||||
|
}).addTo(map);
|
||||||
|
userMarker.bindPopup("You are here").openPopup();
|
||||||
|
|
||||||
|
// Center the map on the user's location
|
||||||
|
map.setView(e.latlng, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to handle the error in retrieving the user's location
|
||||||
|
function onLocationError(e) {
|
||||||
|
alert("Unable to retrieve your location.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request the user's location
|
||||||
|
if (navigator.geolocation) {
|
||||||
|
navigator.geolocation.getCurrentPosition(onLocationFound, onLocationError);
|
||||||
|
} else {
|
||||||
|
alert("Geolocation is not supported by this browser.");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-adminlayout>
|
|
@ -9,23 +9,24 @@
|
||||||
|
|
||||||
|
|
||||||
// ADMIN
|
// ADMIN
|
||||||
|
Route::get('/admin/dashboard', [AdminDashboardController::class, 'index'])->name('admin.home'); // SHOW DASHBOARD
|
||||||
|
Route::get('/admin/data-kursus', [AdminDataKursusController::class, 'dataKursus'])->name('admin.dataKursus'); //SHOW DATA
|
||||||
|
Route::get('/admin/edit-kursus', [AdminDataKursusController::class, 'edit'])->name('admin.edit'); // SHOW TAMPILAN EDIT DATA
|
||||||
|
Route::post('/admin/store', [AdminDataKursusController::class, 'store'])->name('kursus.store'); // TOMBOL SIMPAN TAMBAH DATA
|
||||||
|
Route::get('/admin/createData', [AdminDataKursusController::class, 'create'])->name('admin.create'); // SHOW TAMPILAN TAMBAH DATA
|
||||||
|
|
||||||
Route::get('/admin/dashboard', [AdminDashboardController::class, 'index'])->name('admin.home');
|
Route::delete('/admin/delete/{id}', [AdminDataKursusController::class, 'destroy'])->name('delete');// TOMBOL DELETE DATA
|
||||||
Route::get('/admin/data-kursus', [AdminDataKursusController::class, 'dataKursus'])->name('admin.dataKursus');
|
|
||||||
Route::get('/admin/edit-kursus', [AdminDataKursusController::class, 'edit'])->name('admin.edit');
|
|
||||||
Route::post('/admin/store', [AdminDataKursusController::class, 'store'])->name('kursus.store');
|
|
||||||
Route::get('/admin/createData', [AdminDataKursusController::class, 'create'])->name('admin.create');
|
|
||||||
Route::delete('/admin/delete/{id}', [AdminDataKursusController::class, 'destroy'])->name('delete');
|
|
||||||
// Route::update('/admin/update/{id}', [AdminDataKursusController::class, 'update'])->name('update');
|
// Route::update('/admin/update/{id}', [AdminDataKursusController::class, 'update'])->name('update');
|
||||||
Route::get('/admin/courses', [AdminDataKursusController::class, 'index']);
|
Route::get('/admin/courses', [AdminDataKursusController::class, 'index']);
|
||||||
|
|
||||||
// LOGIN
|
// LOGIN
|
||||||
Route::get('/login', [LoginController::class, 'index'])->name('login');
|
Route::get('/login', [LoginController::class, 'index'])->name('login');
|
||||||
|
|
||||||
Route::get('/', [PengunjungController::class, 'home'])->name('home');
|
// USER
|
||||||
Route::get('/kursus', [PengunjungController::class, 'kursus'])->name('user.kursus');
|
Route::get('/', [PengunjungController::class, 'home'])->name('home'); // SHOW TAMPILAN AWAL
|
||||||
|
Route::get('/kursus', [PengunjungController::class, 'kursus'])->name('user.kursus'); //SHOW TAMPILAN SELURUH KHURSUS
|
||||||
Route::get('/peta', [PengunjungController::class, 'maps'])->name('user.peta');
|
Route::get('/kursus/search', [PengunjungController::class, 'search'])->name('user.kursus.search'); //SHOW TAMPILAN SELURUH KHURSUS
|
||||||
|
|
||||||
Route::get('/kursus/{id}/detail', [PengunjungController::class, 'detail'])->name('kursus.detail');
|
|
||||||
|
|
||||||
|
Route::get('/peta', [PengunjungController::class, 'maps'])->name('user.peta'); //SHOW PETA SELURUH TITIK KURSUS
|
||||||
|
Route::get('/kursus/rute', [PengunjungController::class, 'rute'])->name('user.rute'); //SHOW PETA SELURUH TITIK KURSUS
|
||||||
|
Route::get('/kursus/{id}/detail', [PengunjungController::class, 'detail'])->name('kursus.detail'); // DETAIL KHURSUS MASING"
|
||||||
|
|
Loading…
Reference in New Issue