diff --git a/app/Helpers/general.php b/app/Helpers/general.php
index f9c3413c..31189710 100644
--- a/app/Helpers/general.php
+++ b/app/Helpers/general.php
@@ -10,7 +10,7 @@
*/
function openkab_versi()
{
- return 'v2306.0.0';
+ return 'v2307.0.0';
}
}
diff --git a/app/Http/Controllers/DasborController.php b/app/Http/Controllers/DasborController.php
index e8ebee60..b7d3d349 100644
--- a/app/Http/Controllers/DasborController.php
+++ b/app/Http/Controllers/DasborController.php
@@ -2,10 +2,15 @@
namespace App\Http\Controllers;
+use App\Models\Identitas;
+
class DasborController extends Controller
{
public function index()
{
- return view('dasbor.index');
+ $identitas = new Identitas();
+ $data = $identitas->pengaturan();
+
+ return view('dasbor.index', compact('data'));
}
}
diff --git a/app/Models/Identitas.php b/app/Models/Identitas.php
index e9a95c89..59301cc8 100644
--- a/app/Models/Identitas.php
+++ b/app/Models/Identitas.php
@@ -8,4 +8,24 @@
class Identitas extends Model
{
use HasFactory;
+
+ protected $table = "identitas";
+
+ protected $fillable = [
+ "nama_aplikasi", "deskripsi", "favicon",
+ "logo", "nama_kabupaten", "kode_kabupaten",
+ "nama_provinsi", "kode_provinsi", "sebutan_kab"
+ ];
+
+ public static function pengaturan()
+ {
+ $identitas = self::first();
+
+ $data['nama_aplikasi'] = $identitas->nama_aplikasi ?? config('app.namaAplikasi');
+ $data['sebutanKab'] = $identitas->sebutan_kab ?? config('app.sebutanKab');
+ $nama_kabupaten = preg_replace("/KAB/", "", $identitas->nama_kabupaten) ?? config('app.namaKab');
+ $data['nama_kabupaten'] = strtolower($data['sebutanKab']) == 'kota' ? $nama_kabupaten : $data['sebutanKab'] . ' ' . $nama_kabupaten;
+
+ return $data;
+ }
}
diff --git a/database/migrations/2023_04_29_131347_create_identitas_table.php b/database/migrations/2023_04_29_131347_create_identitas_table.php
index 8d3f4e47..7826dc00 100644
--- a/database/migrations/2023_04_29_131347_create_identitas_table.php
+++ b/database/migrations/2023_04_29_131347_create_identitas_table.php
@@ -2,6 +2,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
@@ -26,6 +27,11 @@ public function up()
$table->string('sebutan_kab', 100);
$table->timestamps();
});
+
+ Artisan::call('db:seed', [
+ '--class' => 'IdentitasSeeder',
+ '--force' => true,
+ ]);
}
/**
diff --git a/database/migrations/2023_05_04_180525_seed_identitas.php b/database/migrations/2023_05_04_180525_seed_identitas.php
deleted file mode 100644
index 775cb73e..00000000
--- a/database/migrations/2023_05_04_180525_seed_identitas.php
+++ /dev/null
@@ -1,30 +0,0 @@
- 'IdentitasSeeder',
- '--force' => true,
- ]);
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- //
- }
-};
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index ceaa8ae2..fec85d33 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -14,9 +14,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
- $this->call([
- CreateAdminUserSeeder::class,
- IdentitasSeeder::class,
- ]);
+ //
}
}
diff --git a/public/.htaccess b/public/.htaccess
index 3aec5e27..2106ca4f 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -19,3 +19,13 @@
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
+
+