What is the difference between auth()->loginUsingId(1);
vs Auth::loginUsingId(1);
性能不会有差异,因为它们做的是相同的事情。
you will get the same results, but one of them you are calling a global function
https://github.com/laravel/framework/blob/5.2/src/Illuminate/Foundation/helpers.php#L136
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.