BookStack\Repos\UserRepo::getAssetCounts PHP Method

getAssetCounts() public method

Get asset created counts for the give user.
public getAssetCounts ( User $user ) : array
$user BookStack\User
return array
    public function getAssetCounts(User $user)
    {
        return ['pages' => $this->entityRepo->page->where('created_by', '=', $user->id)->count(), 'chapters' => $this->entityRepo->chapter->where('created_by', '=', $user->id)->count(), 'books' => $this->entityRepo->book->where('created_by', '=', $user->id)->count()];
    }