mycmdev / nova-modules

A Laravel Nova Tool helping modularize your application
MIT License
7 stars 6 forks source link

Routes to ressources #2

Open Mxmagee opened 4 years ago

Mxmagee commented 4 years ago

Hi, first of all, great package. We have been looking for something like this for quite some time. We installed it and started laying out are models and resources. But we where wandering if theres anything else we need to do for the routing of those pages of is nova-module taking care of that for us?

Problem is that so fare we have not been able to access any of the pages we created inside the modules.

for ex: /modules/Merchants/Resources/batchResource

Normaly that would open up the resource but that gives us a 404

Are we missing something?

image

broomcms commented 4 years ago

I have the same problem . I created a module with one model and one resource file. Tried to access it via the URL but it gave me a 404.

I noticed there was a composer file so I tried a composer install and while I was looking around similar laravel modules system, i noticed you had to yarn install so I tried that to. Yarn fails with a symbolic link. In any case, does every module needs a node_modules and vendor folder or am i over killing it? Because we will have 6 modules so that's a lot of duplicate files.

But I am also wandering how to get the path to the resources to work. I am pretty sure something is missing in the readme documentation.

@mycmdev any ideas?

mycmdev commented 4 years ago

Hello, when you publish nova modules config, you need to set path and namespace according to path you created and specified on your composer.json Anyway i found a problem on resource autoloading that can be connected to your problem. On next tag it will be fixed and you should be able to get resources by url.

mycmdev commented 4 years ago

I have the same problem . I created a module with one model and one resource file. Tried to access it via the URL but it gave me a 404.

I noticed there was a composer file so I tried a composer install and while I was looking around similar laravel modules system, i noticed you had to yarn install so I tried that to. Yarn fails with a symbolic link. In any case, does every module needs a node_modules and vendor folder or am i over killing it? Because we will have 6 modules so that's a lot of duplicate files.

But I am also wandering how to get the path to the resources to work. I am pretty sure something is missing in the readme documentation.

@mycmdev any ideas?

I don't use yarn, usually i use only NPM. Anyway, as i said to @Mxmagee i found a bug during autoload of resources, i'm really sorry for it, don't know why during local tests it worked properly and when i've tried it in production it gave me this issue. I think i will upload the fix tonight.

Pls let me know if the bug will be fixed for you aswell.