怎么查看 Facades 中是否支持某个方法???

我想知道 laravel 中的 Facades 一共提供了多少种方法???或者说怎么查看 Facades 中是否支持某个方法???比方说 Facades 中有 use Illuminate\Support\Facades\DB; 这种方法

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 5

框架自带的Facade在这github.com/laravel/laravel/blob/3c... 查看某个facade支持的方法可以直接在XXXFacade中查看注释

3年前 评论
sunny123456 (楼主) 3年前
3年前 评论
sunny123456 (楼主) 3年前

很完善的注释 :sweat_smile: file

3年前 评论
sunny123456 (楼主) 3年前
自由与温暖是遥不可及的梦想

file 点进去看一下不就晓得了

3年前 评论
sunny123456 (楼主) 3年前
自由与温暖是遥不可及的梦想

@sunny123456

比如 Auth 这个 Facades

@method static mixed guard(string|null $name = null)
@method static void shouldUse(string $name);
@method static bool check()
@method static bool guest()
@method static \Illuminate\Contracts\Auth\Authenticatable|null user()
@method static int|null id()
@method static bool validate(array $credentials = [])
@method static void setUser(\Illuminate\Contracts\Auth\Authenticatable $user)
@method static bool attempt(array $credentials = [], bool $remember = false)
@method static bool once(array $credentials = [])
@method static void login(\Illuminate\Contracts\Auth\Authenticatable $user, bool $remember = false)
@method static \Illuminate\Contracts\Auth\Authenticatable loginUsingId(mixed $id, bool $remember = false)
@method static bool onceUsingId(mixed $id)
@method static bool viaRemember()
@method static void logout()
@method static \Symfony\Component\HttpFoundation\Response|null onceBasic(string $field = 'email',array $extraConditions = [])
@method static null|bool logoutOtherDevices(string $password, string $attribute = 'password')
@method static \Illuminate\Contracts\Auth\UserProvider|null createUserProvider(string $provider = null)
@method static \Illuminate\Auth\AuthManager extend(string $driver, \Closure $callback)
@method static \Illuminate\Auth\AuthManager provider(string $name, \Closure $callback)

以上都是 可以用的方法


@see \Illuminate\Auth\AuthManager
@see \Illuminate\Contracts\Auth\Factory
@see \Illuminate\Contracts\Auth\Guard
@see \Illuminate\Contracts\Auth\StatefulGuard

以上是 方法在那些类里面 都可以找到

file

3年前 评论
sunny123456 (楼主) 3年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!