Woke
This commit is contained in:
parent
fcf4423d98
commit
d78b6055f8
|
@ -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.');
|
||||
}
|
||||
|
||||
|
||||
// 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()
|
||||
{
|
||||
Schema::create('data_kursus', function (Blueprint $table) {
|
||||
$table->id(); // Kolom id dengan auto increment
|
||||
$table->string('nama_kursus'); // Kolom nama_kursus
|
||||
$table->string('img')->nullable(); // Kolom img (nullable jika tidak wajib diisi)
|
||||
$table->text('deskripsi'); // Kolom deskripsi
|
||||
$table->string('paket'); // Kolom paket
|
||||
$table->string('metode'); // Kolom metode
|
||||
$table->text('fasilitas'); // Kolom fasilitas
|
||||
$table->string('lokasi'); // Kolom lokasi
|
||||
$table->decimal('latitude', 10, 7); // Kolom latitude (10 digit, 7 desimal)
|
||||
$table->decimal('longtitude', 10, 7); // Kolom longitude (10 digit, 7 desimal)
|
||||
$table->timestamps(); // Kolom createbed_at dan updated_at
|
||||
$table->id();
|
||||
$table->string('nama_kursus');
|
||||
$table->string('img')->nullable();
|
||||
$table->longText('deskripsi');
|
||||
$table->string('paket');
|
||||
$table->string('metode');
|
||||
$table->text('fasilitas');
|
||||
$table->string('lokasi');
|
||||
$table->decimal('latitude', 10, 7);
|
||||
$table->decimal('longtitude', 10, 7);
|
||||
$table->json('img_konten')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
Loading…
Reference in New Issue