update
parent
fb89af076f
commit
e5a3a61821
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Master;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Setting extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'ms_sekolah';
|
||||||
|
protected $primaryKey = 'MsSekolahId';
|
||||||
|
protected $guarded = [];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('ms_setting', function (Blueprint $table) {
|
||||||
|
$table->id('MsSettingId');
|
||||||
|
$table->string('type')->nullable();
|
||||||
|
$table->date('start_date')->nullable();
|
||||||
|
$table->date('end_date')->nullable();
|
||||||
|
$table->text('deskripsi')->nullable();
|
||||||
|
$table->integer('status')->default(0);
|
||||||
|
$table->timestampsTz();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('settings');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use App\Models\Master\Setting;
|
||||||
|
|
||||||
|
class InsertSettingSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*/
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
|
||||||
|
Setting::updateOrCreate([
|
||||||
|
'type' => 'pengumuman',
|
||||||
|
],[
|
||||||
|
'type' => 'pengumuman',
|
||||||
|
'end_date' => '2026-06-22 11:00',
|
||||||
|
'deskripsi' => 'Tahap pengusulan Calon Sekolah Adiwiyata Provinsi DKI Jakarta telah ditutup. Saat ini sedang berlangsung penilaian oleh Tim Penilai Provinsi. Hasil penilaian dan informasi selanjutnya akan diumumkan melalui SIDIA.',
|
||||||
|
'status' => '1',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue