<?php

namespace App\Models;

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

class Menu extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
        'url',
        'new_tab',
        'parent',
    ];

    public function parentname()
    {
        return $this->belongsTo(Menu::class, 'parent');
    }
}
