NilPortugues\Laravel5\JsonApi\Controller\JsonApiTrait::totalAmountResourceCallable PHP 메소드

totalAmountResourceCallable() 보호된 메소드

Returns the total number of results available for the current resource.
    protected function totalAmountResourceCallable()
    {
        return function () {
            $idKey = $this->getDataModel()->getKeyName();
            return $this->getDataModel()->query()->count([$idKey]);
        };
    }