MIF_E31221322/database/seeders/IndicatorSeeder.php

48 lines
1.3 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\Indicator;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class IndicatorSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
[
Indicator::create([
"name" => "pH Tanah",
"description" => "Tingkat keasaman tanah.",
"ideal_min" => 5.5,
"ideal_max" => 7.0,
"unit" => "pH"
]),
Indicator::create([
"name" => "Ketinggian Tempat",
"description" => "Ketinggian dari permukaan laut..",
"ideal_min" => 0,
"ideal_max" => 1000,
"unit" => "meter"
]),
Indicator::create([
"name" => "Ketersediaan Air",
"description" => "Ketersediaan air di lahan.",
"ideal_min" => 70,
"ideal_max" => 100,
"unit" => "persen"
]),
Indicator::create([
"name" => "Curah Hujan",
"description" => "Intensitas curah hujan.",
"ideal_min" => 1000,
"ideal_max" => 2000,
"unit" => "mm/tahun"
]),
];
}
}