您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
373B

  1. <?php
  2. namespace App\Sessions;
  3. use App\Features\InstanceAble;
  4. use Illuminate\Support\Facades\Auth;
  5. use Illuminate\Validation\UnauthorizedException;
  6. class SessionUser
  7. {
  8. use InstanceAble;
  9. public function user()
  10. {
  11. $user = Auth::user();
  12. if ($user === null) {
  13. throw new UnauthorizedException();
  14. }
  15. return $user;
  16. }
  17. }