Question

I'm trying out Yii and installed the beta of version 2 of the basic application. However, I can't find any documentation on how to proceed after the installation. I like to know how/where I should design the database tables and how to trigger the code generation. I'm planning to use a MySQL database.

I now have a basic web application running (in /web) that I can login to (the user accounts are hardcoded configured User class). There is a lot of documentation on version 1 of the framework, but I would expect some pointers on how to get started with version 2.

Était-ce utile?

La solution

Your table you should design in mysql tool or use migrations to create table. The use gii to generate models. In Yii2 you can access gii with http://localhost/web/index.php?r=gii url

Autres conseils

Get installed Yii giix extension.

In your config file

       'modules'=>array(
        'gii'=>array(
        'class'=>'system.gii.GiiModule',
        'password'=>'pick up a password here',
        ),
       ),

Then, visit the URL localhost/testdrive/index.php?r=gii We will be prompted for a password, which should be the one that we just entered in the above application configuration.

If you stuck anywhere go through this link

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top