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

前端 未结 4 569
北海茫月
北海茫月 2021-02-05 20:07

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/htm

4条回答
  •  花落未央
    2021-02-05 21:03

    Try running:

    php artisan config:cache
    

    to make sure your application is using fresh config files

    EDIT

    Ok, now I see, this library want to use:

      $usersTable  = Config::get('auth.table');
      $userModel   = Config::get('auth.model');
    

    but there is no something like this in auth any more.

    So as temporary workaround you should probaby add table and model to auth file like so: https://github.com/laravel/laravel/blob/5.1/config/auth.php

    and wait until Entrust will be upgraded to remove this

提交回复
热议问题