# Module Methods

On this page

Get an entity from a specific module.

$module = Module::find('blog');

Get module name.

$module->getName();

Get module name in lowercase.

$module->getLowerName();

Get module name in studlycase.

$module->getStudlyName();

Get name in snake case.

$module->getSnakeName();

Get module description.

$module->getDescription();

Get module priority.

$module->getPriority();

Get a specific data from module.json file by given the key.

$module->get('description');

Get a specific data from composer.json file by given the key.

$module->getComposerAttr('name');

Get module path.

$module->getPath();

Get extra path.

$module->getExtraPath('Assets');

Disable the specified module.

$module->disable();

Enable the specified module.

$module->enable();

Check if enabled:

$module->isEnabled();

Check if disabled:

$module->isDisabled();

Check if the status it true or false by passing true or false:

$module->isStatus(false); //returns true if active false if is not active

You can also do a call in one go:

Module::find('Posts')->isEnabled();

Only run the one liner if you've first checked the module exists otherwise you will get an error.

Delete the specified module.

$module->delete();

Set active state for current module.

$module->setActive(false);

Get an array of module requirements. Note: these should be aliases of the module.

$module->getRequires();

Laravel Package built by Nicolas Widart.
Maintained by David Carr follow on X @dcblogdev