GithubHelp home page GithubHelp logo

Comments (8)

nadar avatar nadar commented on August 22, 2024

I dont understand what command you try to execute? Anyhow desired in LUYA is to use the commands folder. What should the other Controller do? What class do you extend from?

from luya.

mhunesi avatar mhunesi commented on August 22, 2024

When I execute controllers/SettingsController
Link: http://localhost/en/admin#!/default/5/mymoduleadmin/settings/index

mymoduleadmin has controllers/SettingsController and commands/SettingsController

controllers/SettingsController

namespace app\modules\mymodule\admin\controllers;

class SettingsController extends luya\admin\base\Controller {
    public function actionIndex()
        {
            return $this->render('index', [
                'data' => [], // Data to assign into the view file `index`.
            ]);
        }
}

commands/SettingsController

namespace app\modules\mymodule\admin\commands;

class SettingsController extends \luya\console\Command {
  public function actionIndex()
    {
        return $this->outputSuccess('Action successfully done');
    }
}

Thanks.

from luya.

nadar avatar nadar commented on August 22, 2024

So to understand that correctly: You are trying to access the class SettingsController extends luya\admin\base\Controller with mymoduleadmin/settings/index but it seems to run the SettingsController extends \luya\console\Command which of course throws the exception from above? Is that the problem?

from luya.

bee1194 avatar bee1194 commented on August 22, 2024

So i can not use tablePrefix in database. Can you check it?. in file \luyadev\luya-module-admin\src\models\UserGroup.php, line 29 should use {{%admin_user_group}} instead of admin_user_group
Thank you

from luya.

nadar avatar nadar commented on August 22, 2024

Hi @bee1194 i don't think this has something to do with the topic, but yes you are right. We should fix that. could you send me a PR or create an issue? Thanks

from luya.

mhunesi avatar mhunesi commented on August 22, 2024

So to understand that correctly: You are trying to access the class SettingsController extends luya\admin\base\Controller with mymoduleadmin/settings/index but it seems to run the SettingsController extends \luya\console\Command which of course throws the exception from above? Is that the problem?

Yes. luya-core/console/Controller.php class throws the exception.

from luya.

nadar avatar nadar commented on August 22, 2024

@mhunesi so the web request http://localhost/en/admin#!/default/5/mymoduleadmin/settings/index runs the console command? is that your problem? sorry for the delay

from luya.

nadar avatar nadar commented on August 22, 2024

I am going to close this issue because:

  • Its a question (Please post questions at LUYA discussions)
  • Missing information's
  • No more activity
  • No one picked up the task (no Pull Request received)

If you think this is still important or there are more/new informations. Please reopen the issue and let us know.

If this is a problem or a feature you like to discuss, join our discussion: LUYA discussions. We try to keep our issue tracker as clean as possible in order to focus on active issues.

from luya.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.