Contract 参考
最后更新于:2022-04-01 15:05:05
以下是大部分 Laravel Contracts 的参考,以及相对应的 "facade"
|Contract|Laravel 4.x Facade|
|--------|------------------|
|Illuminate\Contracts\Auth\Guard|Auth|
|Illuminate\Contracts\Auth\PasswordBroker|Password|
|Illuminate\Contracts\Bus\Dispatcher|Bus|
|Illuminate\Contracts\Cache\Repository|Cache|
|Illuminate\Contracts\Cache\Factory|Cache::driver()|
|Illuminate\Contracts\Config\Repository|Config|
|Illuminate\Contracts\Container\Container|App|
|Illuminate\Contracts\Cookie\Factory|Cookie|
|Illuminate\Contracts\Cookie\QueueingFactory|Cookie::queue()|
|Illuminate\Contracts\Encryption\Encrypter Crypt|
|Illuminate\Contracts\Events\Dispatcher Event|
|Illuminate\Contracts\Filesystem\Cloud||
|Illuminate\Contracts\Filesystem\Factory|File|
|Illuminate\Contracts\Filesystem\Filesystem|File|
|Illuminate\Contracts\Foundation\Application|App|
|Illuminate\Contracts\Hashing\Hasher|Hash|
|Illuminate\Contracts\Logging\Log|Log|
|Illuminate\Contracts\Mail\MailQueue|Mail::queue()|
|Illuminate\Contracts\Mail\Mailer|Mail|
|Illuminate\Contracts\Queue\Factory|Queue::driver()|
|Illuminate\Contracts\Queue\Queue|Queue|
|Illuminate\Contracts\Redis\Database|Redis|
|Illuminate\Contracts\Routing\Registrar|Route|
|Illuminate\Contracts\Routing\ResponseFactory|Response|
|Illuminate\Contracts\Routing\UrlGenerator|URL|
|Illuminate\Contracts\Support\Arrayable||
|Illuminate\Contracts\Support\Jsonable||
|Illuminate\Contracts\Support\Renderable||
|Illuminate\Contracts\Validation\Factory|Validator::make()|
|Illuminate\Contracts\Validation\Validator||
|Illuminate\Contracts\View\Factory|View::make()|
|Illuminate\Contracts\View\View||