<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class M_Perintah extends Model
{
    use HasFactory;

    protected $table = 'tb_perintah';
    protected $primaryKey = 'id_perintah';

    protected $fillable = ['data'];

    public function ambildataperintah()
    {
        // Mengambil data perintah dengan id_perintah 1
        return $this->where('id_perintah', 1)->get();
    }
}
