<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class KeanggotaanModel extends Model
{
    use HasFactory;
    protected $table = 'keanggotaan';
    protected $primaryKey = 'id_keanggotaan';

    public static function allKeanggotaan()
    {
        return DB::table('keanggotaan')->get();
    }

    public static function getKeanggotaanById($id)
    {
        return DB::table('keanggotaan')->where('id_keanggotaan', $id)->first();
    }
}
