32 lines
586 B
PHP
32 lines
586 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable; // PENTING: Ganti ini
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
class Petani extends Authenticatable
|
|
{
|
|
use Notifiable;
|
|
|
|
protected $table = 'petanis';
|
|
|
|
protected $fillable = [
|
|
'nama_lengkap',
|
|
'username',
|
|
'password',
|
|
'no_hp',
|
|
'alamat',
|
|
'nama_usaha',
|
|
'status_akun'
|
|
];
|
|
|
|
protected $hidden = [
|
|
'password',
|
|
];
|
|
|
|
public function produks()
|
|
{
|
|
return $this->hasMany(Produk::class, 'petani_id');
|
|
}
|
|
} |