FTXInfotech / laravel-adminpanel

A Laravel Admin Panel (Laravel Version : 6.0)
966 stars 461 forks source link

modular approach? #162

Closed shirshak55 closed 6 years ago

shirshak55 commented 6 years ago

I guess before shifting to laravel 5.6 we can go to modular approach. Like a module named blog has its own controller, routes , views etc..?? There is even a plugin to help with it .

Thanks

bvipul commented 6 years ago

@bloggervista I guess we have that modular approach already, we have modules differentiated using different controllers for each module, each module has its own routes files, repository file, Model file and views too.

shirshak55 commented 6 years ago

Bro it is but i guess around 30% modular. If it was modular it would look like this:

app/
bootstrap/
vendor/
Modules/
  ├── Blog/
      ├── Assets/
      ├── Config/
      ├── Console/
      ├── Database/
          ├── Migrations/
          ├── Seeders/
      ├── Entities/
      ├── Http/
          ├── Controllers/
          ├── Middleware/
          ├── Requests/
          ├── routes.php
      ├── Providers/
          ├── BlogServiceProvider.php
      ├── Resources/
          ├── lang/
          ├── views/
      ├── Repositories/
      ├── Tests/
      ├── composer.json
      ├── module.json
      ├── start.php
 ├── BlogCategories/
      ├── Assets/
      ├── Config/
      ├── Console/
      ├── Database/
          ├── Migrations/
          ├── Seeders/
      ├── Entities/
      ├── Http/
          ├── Controllers/
          ├── Middleware/
          ├── Requests/
          ├── routes.php
      ├── Providers/
          ├── BlogServiceProvider.php
      ├── Resources/
          ├── lang/
          ├── views/
      ├── Repositories/
      ├── Tests/
      ├── composer.json
      ├── module.json
      ├── start.php
 ├── BlogTags/
      ├── Assets/
      ├── Config/
      ├── Console/
      ├── Database/
          ├── Migrations/
          ├── Seeders/
      ├── Entities/
      ├── Http/
          ├── Controllers/
          ├── Middleware/
          ├── Requests/
          ├── routes.php
      ├── Providers/
          ├── BlogServiceProvider.php
      ├── Resources/
          ├── lang/
          ├── views/
      ├── Repositories/
      ├── Tests/
      ├── composer.json
      ├── module.json
      ├── start.php

So i can attach new modules and remove existing with ease. I hope you understand. This is basically a enhancement and as it don't have vue it is easy to shift to this approach :)

Thanks for awesome package.

bvipul commented 6 years ago

@bloggervista which plugin/package are you talking about to have this modularity?

shirshak55 commented 6 years ago

You can read https://softwareengineering.stackexchange.com/questions/120956/how-to-build-completely-modular-web-applications

For easiness we can use https://github.com/nWidart/laravel-modules as this is most updated modular based approach plugin

viralsolani commented 6 years ago

@bloggervista @bvipul well Asgard CMS is also using the same approach. Nice idea and We have thought about that previously as well. We can sure consider this idea and can work in future.

bvipul commented 6 years ago

@viralsolani @bloggervista I have seen Asgard CMS and that modular approach, when looking in to the folder structure looks good, but I find it confusing while developing and extending their original functionality. Sure it's a good idea but I would like to keep it this way for some time in future. Will sure try to implement that, and @indranshastri is working to see if we can do it and will it make it more easier for developers out there. I am closing this ticket for now, I have it written down in my To-do list. Thanks @bloggervista.