mercredi 30 décembre 2015

How to fix in laravel 5.2 zizaco entrust:migration class name validation?

I have followed zizac/entrust installation tutorial from GitHub Link and faced with error:

Class name must be a valid object or a string in var/www/html/laravel_test/vendor/zizaco/entrust/src/commands/MigrationCommand.php on line 86

MigrationCommand.php file url : Link

Outut:

php artisan entrust:migration

Tables: roles, role_user, permissions, permission_role
A migration that creates 'roles', 'role_user', 'permissions', 'permission_role' tables will be created in database/migrations directory

Proceed with the migration creation? [Yes|no] (yes/no) [yes]: yes

Creating migration...
PHP Fatal error:  Class name must be a valid object or a string in /var/www/html/laravel_test/vendor/zizaco/entrust/src/commands/MigrationCommand.php on line 86

the command: php artisan vendor:publish was successful.

File : config/entrust.php exist.

I didin't change any options to config/auth.php file same as - auth.php. How to fix it?



via Chebli Mohamed

2 commentaires:

  1. Look this https://github.com/Zizaco/entrust/issues/467#issue-124659216

    Hope it'll help you.

    RépondreSupprimer
  2. Add line in config/auth.php

    'model' => Path\Of\ModelUser::class,
    'table' => 'users',

    RépondreSupprimer