<?php

namespace App\Models;

use App\Models\SubMenu;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Menu extends Model
{
    use HasFactory;
    protected $fillable = ['menu_name', 'da_menu_name', 'pa_menu_name','resource_id','resource_type','route_name','menu_order'];

    public function sub_menus()
    {
        return $this->hasMany(SubMenu::class)->orderBy('sub_menu_order','ASC');
    }

}
