<?php

namespace Modules\User\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Module extends Model
{
    use SoftDeletes;
    protected $fillable = ['name', 'path', 'meta'];

    protected $casts = ['meta' => 'array'];

    public function users()
    {
        return $this->belongsToMany(User::class,'user_modules');
    }
}
