GithubHelp home page GithubHelp logo

Comments (5)

nadar avatar nadar commented on June 4, 2024

Hi @dinya17 I am not sure to understood all your questions, but i try:

  1. Its related to admin user class (https://luya.io/api/luya-admin-models-User). You can always create your own module, extend from existing models and apply your own migrations. (in short: create a new module, create a migration, extend your user class from \luya\admin\models\User)

  2. LUYA composition component provides this kind of language and region setup. The langShortCodeimplemention is required and used by the cms, the countryShortCode (also known as region param) is then part of your application logic, in how you use.

if (Yii::$app->composition['countryShortCode'] == 'fr') {
    $this->layout = 'fr_layout.php';
} else {
   $this->layout = 'other_layout.php';
}

You can use hostInfoMapping if you want to provide the same site from different domains with different configurations. You will find a full example here: https://luya.io/guide/concept-composition

  1. Not sure what you mean by ActiveDirectory, but in your frontend logic, you can do what ever you want, its Yii 2.
  2. Same as for point 3, its Yii 2 you can use all the components in frontends if you like, but not for the luya admin module.

from luya-kickstarter.

masihfathi avatar masihfathi commented on June 4, 2024

hi, i have some another question mayby relate to this issue:

  1. frontend user model is diffrent for admin user? and we should add other user identity class, models,migrations,login, forgot password, registeration page, i18n and RBAC tables for frontend users?
  2. where can i add module and component config to console.php? for example how can i add config for yii2 queue and ...?
  3. and another question, in luya we dont have controllers and command folder and model directory in root directory. must all thing in luya have module?

from luya-kickstarter.

nadar avatar nadar commented on June 4, 2024

Hi @masihfathi questions are always welcome.

  1. We are working on a frontend account module: https://github.com/luyadev/luya-module-account - admin user is really thought to work with admin interface, you can of course also use this user model for your frontend application if you like. We are working on an opensource project, which will provide a demo.

  2. Just add the component to your config, as components will only build when requesting, so you don't have to mix between console/web components. We decided against the concept of having 5 config files which are merging each other, and also we are not a fan of copy and paste code from project to project with a console and web application setup. So we decide to have 1 place, 1 config, 1 file where your app is configure and the luya\Boot process will then choose what is right for the current request (web or console). So just add your console stuff into the config. Or of course if you like you can always create your own console application with your own config.

  3. You can put commands in @app/commands if you like and then add them to the controllerMap (described here: https://luya.io/guide/luya-console). If you have an application without CMS, you can put controllers into the @app/controllers folder, only when working with the CMS, currently those controllers can not be accessed. Sometimes a module feels like an overkill, but when start working with modules, own namespaces, making packages, distribute those over composer, think global. Then its a good choice. (btw: here is a core kickstarter, without cms, you will see the controllers are located in the root as well: https://github.com/luyadev/luya-kickstarter-core, so if you are just using the admin module, with some frontend controller logic, no frontend module is required.)

Does that answer your questions? If not, let me know.

from luya-kickstarter.

masihfathi avatar masihfathi commented on June 4, 2024

thanks about answer. i think it is really good to add complete open source project quickly(as soon as possible) cause it is clearly show the power of luya and a lot of question solved. frontend account, some stuff like Yii2-rbac manager for frontend users cause frontend good logic without a lot of bugs in user module and RBAC is more important than admin users for a cms( i think), in a project we have a few admin users but we have a lot of frontend users for example in a ads system and ...

from luya-kickstarter.

nadar avatar nadar commented on June 4, 2024

I am going to close this since its not a real "issue". Questions can also be asked in slack or gitter channel's.

from luya-kickstarter.

Related Issues (19)

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.