How to use different modules table in another module controller



  • I want to use different module database table query in page module how can i use that please help



  • how to use direct query of the another table in page module public controllerr please help......



  • I would set the repository so that it is available in the controller that you are using. Then call the function as normal.

    2 other ways would be:

    1. set a variable in your view composer which is what is done in page extension video. Just make sure that you set it for just view you need it in.

    2. recreate that function within the module that you are building. (I don't really like doing this because it cause similar code to be in multiple places)


  • Global Moderator

    @meet

    Hey,
    If you have any specific suggestion or use case feel free to explain it here.
    That would help to identify what aspect is CMS missing.

    Most of the things can be done without touching any core files.

    For example if you want to load extra information into some view you would use view composer and add data to that specific view.



  • Hey i just want to display template page body in home page nonthing else thanks for reply


  • Global Moderator

    You will need to edit master view of homepage.
    There is many examples in AsgardCMS core modules on how to add stuff to view via composers/creators.


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.