<?php namespace App\Exceptions\Api; class LoginException extends ApiException { // 错误返回码 protected $errCode = 'no_login'; // 本地化前缀 protected $langkey = 'api_login'; }