【文件属性】:
文件名称:laravel-context:管理一次请求生命周期中的数据
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-14 16:43:11
PHP
Context
管理一次请求生命周期中的数据
Install
composer require lingxi/context
Lingxi\Context\ContextServiceProvider::class,
'Context' => Lingxi\Context\ContextFacade::class,
Usage
<?php
Context::set('user', User::find(request('user_id')));
Context::get('user');
【文件预览】:
laravel-context-master
----.gitignore(17B)
----.styleci.yml(30B)
----tests()
--------ContextTest.php(716B)
----phpunit.xml(680B)
----composer.lock(46KB)
----composer.json(415B)
----src()
--------ContextFacade.php(291B)
--------ContextServiceProvider.php(405B)
--------Context.php(1KB)
----readme.md(902B)
----.travis.yml(158B)