djsxianglei

4193 经验值

谢谢老师,是homestead,root密码为空,需要自己去设置一下sudo passwd

请问一下vagrant 用ssh连接 root的密码是什么

料事如神,果然忘写return了

那该怎么修改?我和您视频里面都一样,我用的是laravel5.4

Psy Shell v0.8.15 (PHP 5.6.27 鈥?cli) by Justin Hileman

>>> namespace App;
>>> $role = new Role;
=> App\Role {#711}
>>> $role->name='admin';
=> "admin"
>>> $role->label='Admin';
=> "Admin"
>>> $role->save();
=> true
>>> $permission = new Permission;
=> App\Permission {#117}
>>> $permission->name='edit_form';
=> "edit_form"
>>> $permission->label='edit the form';
=> "edit the form"
>>> $permission->save();
=> true
>>> $role->givePermission($permission);
PHP Fatal error:  Call to a member function save() on null in F:\www\test.dev\app\Role.php on line 19


  [Symfony\Component\Debug\Exception\FatalErrorException]
  Call to a member function save() on null

我执行$role->givePermission($permission);报错误

 Call to a member function save() on null

老师是什么原因

谢谢老师,我在app\Exceptions\Handler.php改动一下unauthenticated这个方法,吧login改成了user/login,可以了
/

在未登录的情况下,访问auth中间件中的路由,默认会给跳到登录路由,也就是/login,问下怎么配置这条路由,5.2的知道,5.3结构不一样了,老师这个该怎么配置

我用的是laravel5.3框架,如何去设置Authenticate.php下用户未登录跳转的路由