<?php

namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Branch extends Model
{
    use HasFactory;
    protected $guarded = [];

    // Tambahkan Relasi ini
    public function creator(): BelongsTo
    {
        return $this->belongsTo(User::class, 'created_by');
    }
}