ThinkPHP’s Facade vs. Laravel’s Facade

ThinkPHP’s facade implementation borrows from Laravel’s real-time facades feature: it lets you call non-static methods on a class statically, without needing to instantiate it first.

But it’s not as seamless as Laravel’s version (where you just prefix the class with the Facades\ namespace during import, and it magically turns into a facade). In ThinkPHP, you have to roll your own facade class manually.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注