TKK_E32211801/app/Models/Coba.php

24 lines
722 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Coba extends Model
{
use HasFactory;
// Nama tabel yang dihubungkan dengan model ini
protected $table = 'waterflow1';
// Primary key dari tabel ini
protected $primaryKey = 'id'; // Jika primary key Anda bukan 'id', ubah properti ini
// Menonaktifkan timestamps jika tabel tidak memiliki kolom created_at dan updated_at
public $timestamps = true; // Set to false if the table doesn't have these columns
// Daftar kolom yang boleh diisi secara massal
protected $fillable = ['arus', 'total', 'tanggal']; // Tambahkan kolom 'tanggal' ke dalam fillable
}