Facade methods — Laravel

Joy Joel
1 min readDec 18, 2022

Get all modules.

Module::all();

Get all cached modules.

Module::getCached()

Get the ordered modules. The modules will be ordered by the priority key in module.json file.

Module::getOrdered();

Get scanned modules.

Module::scan();

Find a specific module.

Module::find('name');
// OR
Module::get('name');

Find a module, if there is one, return the Module instance, otherwise throw Nwidart\Modules\Exeptions\ModuleNotFoundException.

Module::findOrFail('module-name');

Get scanned paths.

Module::getScanPaths();

Get all modules as a collection instance.

Module::toCollection();

Get modules by the status. 1 for active and 0 for inactive.

Module::getByStatus(1);

Check the specified module. If it exists, it will return, otherwise false.

Module::has('blog');

Get all enabled modules.

Module::enabled();

Get all disabled modules.

Module::disabled();

Get a count of all modules.

Module::count();

Get module path.

Module::getPath();

--

--

Joy Joel

Abba’s Daughter| DevOps Engineer|Technical Writer