如果采用注释里的代码的话,会报如下错误:
FatalThrowableError in PostsController.php line 18:
Non-static method Illuminate\Contracts\Auth\Access\Gate::denies() cannot be called statically
(看了下Gate类,denies()方法不是静态方法。)
@jellybool 老师你好,我的laravel是5.4版本
postsphp artisan make:model Post这条语句生成的post.php是空表,$fillable=[],这样对吗?
然后在factory(‘App\Post’)->create();这条语句执行时出错
PHP error: Array to string conversion in K:\workspace\phpstudy\WWW\acl\vendor\laravel\framework\src\Illuminate\Database\MySqlConnection.php on line 80