Module
A module is, well, the core of a module. All you need pretty much is to generate a base model and register it.
Generating a new modelโ
You could run php artisan pandawa:make:module to generate a base module.
tip
Read more about CLI.
Or, use the namespace at Pandawa\Component\Module\AbstractModule.
Template ๐
Replace the things encapsulated with <> including itself as well.
<?php
declare(strict_types=1);
namespace <Namespace>\<Folder>;
use Pandawa\Component\Module\AbstractModule;
final class <Name>Module extends AbstractModule {
//->
}
Registring a moduleโ
You need to first locate config/packages.php and add the newly created module to the list.
Example ๐งช
<?php
return [
// ...
Blog\Post\BlogPostModule::class,
];