diff --git a/src/Providers/SystemServiceProvider.php b/src/Providers/SystemServiceProvider.php index dab8e7d..a31b802 100644 --- a/src/Providers/SystemServiceProvider.php +++ b/src/Providers/SystemServiceProvider.php @@ -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(); + }); + } } \ No newline at end of file diff --git a/src/QueryList.php b/src/QueryList.php index 192f161..b4c597f 100644 --- a/src/QueryList.php +++ b/src/QueryList.php @@ -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 = [])