I have 20 to 25 models in my project, so when I want to use a model I have to load it in controller like
use App\Library;
use App\Vote;
Is there any better way to load a group of model.
在PHP 7+中,可以将具有相同名称空间的类( 文档 )分组:
use App\{Library, Vote};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.