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

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

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 5

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

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

很完善的注释 :sweat_smile: file

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

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

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

@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

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

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