add queryData()

This commit is contained in:
Jaeger 2018-10-15 18:52:12 +08:00
parent 1d73895981
commit 1c2e3f4adf
2 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,7 @@ namespace QL\Providers;
use QL\Contracts\ServiceProviderContract;
use QL\Kernel;
use Closure;
class SystemServiceProvider implements ServiceProviderContract
{
@ -19,5 +20,9 @@ class SystemServiceProvider implements ServiceProviderContract
return $this;
});
$kernel->bind('queryData',function (Closure $callback = null){
return $this->query()->getData($callback)->all();
});
}
}

View File

@ -30,6 +30,7 @@ use Closure;
* @method QueryList removeHead()
* @method QueryList query(Closure $callback = null)
* @method Collection getData(Closure $callback = null)
* @method Array queryData(Closure $callback = null)
* @method QueryList setData(Collection $data)
* @method QueryList encoding(string $outputEncoding,string $inputEncoding = null)
* @method QueryList get($url,$args = null,$otherArgs = [])