Skip to content

Instantly share code, notes, and snippets.

@HavenShen
Created May 21, 2018 08:44
Show Gist options
  • Save HavenShen/4cd7b88462021f801ffc98f0ce4c352a to your computer and use it in GitHub Desktop.
Save HavenShen/4cd7b88462021f801ffc98f0ce4c352a to your computer and use it in GitHub Desktop.
可以使用 {} 包含相同路径命名空间。
<?php
/*
|--------------------------------------------------------------------------
| 分组使用声明
|--------------------------------------------------------------------------
|
| 可以使用 {} 包含相同路径命名空间。
|
*/
// PHP 7 之前
use App\Models\User as U;
use App\Models\Point as P;
use App\Models\Album as A;
// PHP 7 之后
use App\Models\{User as U, Point as P, Album as A};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment