Closed fakharak closed 2 years ago
Can you share your modules-livewire.php
config file, please?
Can you share your
modules-livewire.php
config file, please?
I made it work by configuring custom_modules array in modules-livewire.php like this
'custom_modules' => [
'Admin' => [
'path' => base_path('../Modules'),
'module_namespace' => 'Modules\\Admin',
'namespace' => 'Admin\\Http\\Livewire',
'view' => 'Admin/Resources/views/livewire',
'name_lower' => 'admin',
],
],
Then used the command which worked like charm
`php artisan module:make-livewire [MainFunctionName/LiveWireComponentName] [ModuleName] --force`
May be that can be helpful for someone who visits here, so please elaborate this procedure on main ReadMe, if possible. Great thanks for taking time to help.
Maybe the base path should be changed to base_path('Modules/Admin')
and in composer.json file should be configured autoload for the Modules\\Admin
namespace.
Please check this example project - https://github.com/mhmiton/laravel-modules-livewire-example. I added a custom Chat module. Hope it will be helpful for you.
Please, also see the image attached.
My project root folder is "g-modules", inside "g-modules" i have (nWidart) "Modules" folder, and inside that i have "Admin" module where i want to create /work Live-wire Search. So, path is g-modules/Modules/Admin. However, as per instructions, i am installing the package from root of project "g-modules/" and also publish config which publishes configuration file in the root's /config/ folder.
Now when i try to create module using given command (as shown in image), i get Module "Admin" not found in this path.