belongsTo(Provider::class); } public function module() { return $this->belongsTo(Module::class); } public function getIsEnabledAttribute($value) { return (bool) $value; } // before create // protected static function boot() // { // parent::boot(); // static::creating(function ($model) { // }); // } }