Update Status kelengkapan data
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models\Pertanian;
|
||||
|
||||
use App\Models\Concerns\KembalikanStatusPetaniKeDraf;
|
||||
use App\Enums\Pendidikan;
|
||||
use App\Enums\Pernikahan;
|
||||
use App\Enums\Role;
|
||||
@@ -30,7 +31,7 @@ use Illuminate\Support\Str;
|
||||
|
||||
class Petani extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
use SoftDeletes, KembalikanStatusPetaniKeDraf;
|
||||
|
||||
protected $table = 'petani';
|
||||
|
||||
@@ -420,4 +421,10 @@ class Petani extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
|
||||
// Untuk trait KembalikanStatusPetaniKeDraf: petani ini sendiri.
|
||||
protected function petaniIdUntukStatus(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user