mdmsoft / yii2-admin

Auth manager for Yii2 (RBAC Manager)
GNU General Public License v3.0
1.16k stars 577 forks source link

Migrations & Error in Call to undefined method app\models\User::find() #22

Closed ricardocanelas closed 10 years ago

ricardocanelas commented 10 years ago

Hi..

I am not able to create the tables.

php yii migrate/up --migrationPath=@vendor/mdmsoft/yii2-admin/migration Only migrate 'create_menu_table'

..And..

captura de tela 2014-06-26 as 22 16 45

error

mdmunir commented 10 years ago

I know. you use yii2-app-basic, dont you? this extension not contain migration for user table. if you need this table, download migration from this and you should create active record from this table.

PS: suggestion for you, install app-advance instead of app-basic :D

rubenheymans commented 10 years ago

you should read this first: http://stuff.cebe.cc/yii2docs/guide-security-authorization.html#role-based-access-control-rbac and look at this: http://stuff.cebe.cc/yii2docs/yii-rbac-dbmanager.html this is the migration you need: yii migrate --migrationPath=@yii/rbac/migrations/

mdmunir commented 10 years ago

@hashie5 Thanks.

sree-kumar commented 6 years ago

I am getting the following error: Call to undefined method mdm\admin\models\AuthItem::getDb()

in /var/www/html/basic/vendor/yiisoft/yii2/validators/UniqueValidator.php