BaseController.php 311 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Http\Controllers\Api\V1;
  3. use App\Http\Controllers\Controller;
  4. use Illuminate\Support\Facades\Auth;
  5. class BaseController extends Controller
  6. {
  7. /**
  8. * 登陆用户id
  9. *
  10. * @return number|NULL
  11. */
  12. static public function auth()
  13. {
  14. return Auth::id();
  15. }
  16. }