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

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

《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
讨论数量: 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年前

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