├── resources ├── dist │ ├── .gitkeep │ └── filament-stacked-image-column.css ├── js │ └── plugin.js ├── lang │ └── en │ │ └── .gitkeep ├── views │ ├── .gitkeep │ └── columns │ │ └── stacked-image-column.blade.php └── css │ └── plugin.css ├── .prettierrc ├── config └── filament-stacked-image-column.php ├── postcss.config.js ├── CHANGELOG.md ├── pint.json ├── database ├── factories │ └── ModelFactory.php └── migrations │ └── create_filament-stacked-image-column_table.php.stub ├── src ├── Columns │ ├── Concerns │ │ ├── HasRing.php │ │ ├── HasOverlap.php │ │ └── HasRemaining.php │ └── StackedImageColumn.php └── StackedImageColumnServiceProvider.php ├── tailwind.config.js ├── package.json ├── LICENSE.md ├── composer.json └── README.md /resources/dist/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/js/plugin.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/lang/en/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/css/plugin.css: -------------------------------------------------------------------------------- 1 | @tailwind utilities; 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "trailingComma": "all" 5 | } 6 | -------------------------------------------------------------------------------- /config/filament-stacked-image-column.php: -------------------------------------------------------------------------------- 1 | ring = $ring; 14 | 15 | return $this; 16 | } 17 | 18 | public function getRing(): ?int 19 | { 20 | return $this->evaluate($this->ring); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Columns/Concerns/HasOverlap.php: -------------------------------------------------------------------------------- 1 | overlap = $overlap; 14 | 15 | return $this; 16 | } 17 | 18 | public function getOverlap(): ?int 19 | { 20 | return $this->evaluate($this->overlap); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/migrations/create_filament-stacked-image-column_table.php.stub: -------------------------------------------------------------------------------- 1 | id(); 13 | 14 | // add fields 15 | 16 | $table->timestamps(); 17 | }); 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const colors = require('tailwindcss/colors') 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | module.exports = { 5 | content: ['./resources/views/**/*.blade.php', './src/**/*.php'], 6 | darkMode: 'class', 7 | theme: { 8 | extend: { 9 | colors: { 10 | danger: colors.rose, 11 | primary: colors.amber, 12 | success: colors.green, 13 | warning: colors.amber, 14 | }, 15 | }, 16 | }, 17 | corePlugins: { 18 | preflight: false, 19 | }, 20 | plugins: [], 21 | } 22 | -------------------------------------------------------------------------------- /src/StackedImageColumnServiceProvider.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/../resources/dist/filament-stacked-image-column.css', 14 | ]; 15 | 16 | public function configurePackage(Package $package): void 17 | { 18 | $package->name(static::$name) 19 | ->hasAssets() 20 | ->hasViews(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev:styles": "npx tailwindcss -i resources/css/plugin.css -o resources/dist/filament-stacked-image-column.css --postcss --watch", 5 | "build:styles": "npx tailwindcss -i resources/css/plugin.css -o resources/dist/filament-stacked-image-column.css --postcss --minify && npm run purge", 6 | "purge": "filament-purge -i resources/dist/filament-stacked-image-column.css -o resources/dist/filament-stacked-image-column.css", 7 | "dev": "npm-run-all --parallel dev:*", 8 | "build": "npm-run-all build:*" 9 | }, 10 | "devDependencies": { 11 | "@awcodes/filament-plugin-purge": "^1.0.2", 12 | "autoprefixer": "^10.4.7", 13 | "esbuild": "^0.8.57", 14 | "npm-run-all": "^4.1.5", 15 | "postcss": "^8.4.14", 16 | "prettier": "^2.7.1", 17 | "prettier-plugin-tailwindcss": "^0.1.13", 18 | "tailwindcss": "^3.1.6" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) archilex 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Columns/Concerns/HasRemaining.php: -------------------------------------------------------------------------------- 1 | shouldShowRemaining = $condition; 18 | $this->showRemainingAfterStack($showRemainingAfterStack); 19 | $this->remainingTextSize($remainingTextSize); 20 | 21 | return $this; 22 | } 23 | 24 | public function showRemainingAfterStack(bool | Closure $condition = true): static 25 | { 26 | $this->shouldShowRemainingAfterStack = $condition; 27 | 28 | return $this; 29 | } 30 | 31 | public function shouldShowRemaining(): bool 32 | { 33 | return (bool) $this->evaluate($this->shouldShowRemaining); 34 | } 35 | 36 | public function shouldShowRemainingAfterStack(): bool 37 | { 38 | return (bool) $this->evaluate($this->shouldShowRemainingAfterStack); 39 | } 40 | 41 | public function remainingTextSize(string | Closure | null $remainingTextSize): static 42 | { 43 | $this->remainingTextSize = $remainingTextSize; 44 | 45 | return $this; 46 | } 47 | 48 | public function getRemainingTextSize(): ?string 49 | { 50 | return $this->evaluate($this->remainingTextSize); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /resources/dist/filament-stacked-image-column.css: -------------------------------------------------------------------------------- 1 | .-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-.25rem*var(--tw-space-x-reverse));margin-left:calc(-.25rem*(1 - var(--tw-space-x-reverse)))}.-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-.5rem*var(--tw-space-x-reverse));margin-left:calc(-.5rem*(1 - var(--tw-space-x-reverse)))}.-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-.75rem*var(--tw-space-x-reverse));margin-left:calc(-.75rem*(1 - var(--tw-space-x-reverse)))}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-1rem*var(--tw-space-x-reverse));margin-left:calc(-1rem*(1 - var(--tw-space-x-reverse)))}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px*var(--tw-space-x-reverse));margin-left:calc(0px*(1 - var(--tw-space-x-reverse)))}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-0{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:ring-gray-800){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity))} -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "archilex/filament-stacked-image-column", 3 | "description": "Display multiple images as a stack in your Filament tables", 4 | "keywords": [ 5 | "archilex", 6 | "laravel", 7 | "filament-stacked-image-column", 8 | "admin panel", 9 | "tables", 10 | "column", 11 | "images" 12 | ], 13 | "homepage": "https://github.com/archilex/filament-stacked-image-column", 14 | "license": "MIT", 15 | "authors": [ 16 | { 17 | "name": "Kenneth Sese", 18 | "email": "kmsese@gmail.com", 19 | "role": "Developer" 20 | } 21 | ], 22 | "require": { 23 | "php": "^8.0", 24 | "filament/filament": "^2.0", 25 | "spatie/laravel-package-tools": "^1.13.5", 26 | "illuminate/contracts": "^9.0|^10.0" 27 | }, 28 | "require-dev": { 29 | "laravel/pint": "^1.0", 30 | "nunomaduro/collision": "^6.0|^7.0", 31 | "orchestra/testbench": "^7.0|^8.0", 32 | "pestphp/pest": "^1.21", 33 | "pestphp/pest-plugin-laravel": "^1.1", 34 | "pestphp/pest-plugin-livewire": "^1.0", 35 | "pestphp/pest-plugin-parallel": "^0.3", 36 | "phpunit/phpunit": "^9.5|^10.0", 37 | "spatie/laravel-ray": "^1.26" 38 | }, 39 | "autoload": { 40 | "psr-4": { 41 | "Archilex\\StackedImageColumn\\": "src", 42 | "Archilex\\StackedImageColumn\\Database\\Factories\\": "database/factories" 43 | } 44 | }, 45 | "autoload-dev": { 46 | "psr-4": { 47 | "Archilex\\StackedImageColumn\\Tests\\": "tests" 48 | } 49 | }, 50 | "scripts": { 51 | "pint": "vendor/bin/pint", 52 | "test:pest": "vendor/bin/pest --parallel", 53 | "test": [ 54 | "@test:pest", 55 | "@test:phpstan" 56 | ] 57 | }, 58 | "config": { 59 | "sort-packages": true, 60 | "allow-plugins": { 61 | "composer/package-versions-deprecated": true, 62 | "pestphp/pest-plugin": true, 63 | "phpstan/extension-installer": true 64 | } 65 | }, 66 | "extra": { 67 | "laravel": { 68 | "providers": [ 69 | "Archilex\\StackedImageColumn\\StackedImageColumnServiceProvider" 70 | ], 71 | "aliases": { 72 | "StackedImageColumn": "Archilex\\StackedImageColumn\\Facades\\StackedImageColumn" 73 | } 74 | } 75 | }, 76 | "minimum-stability": "dev", 77 | "prefer-stable": true 78 | } -------------------------------------------------------------------------------- /resources/views/columns/stacked-image-column.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $images = $getImages(); 3 | $imagesWithPath = $getImagesWithPath(); 4 | $height = $getHeight(); 5 | $width = $getWidth() ?? ($isCircular() || $isSquare() ? $height : null); 6 | $overlap = $getOverlap() ?? 1; 7 | $imageCount = 0; 8 | 9 | $defaultImageUrl = $getDefaultImageUrl(); 10 | 11 | if ((! count($images)) && filled($defaultImageUrl)) { 12 | $imagesWithPath = [null]; 13 | } 14 | 15 | 16 | $ring = match ($getRing()) { 17 | 0 => 'ring-0', 18 | 1 => 'ring-1', 19 | 2 => 'ring-2', 20 | 4 => 'ring-4', 21 | default => 'ring', 22 | }; 23 | 24 | $remainingTextSize = match ($getRemainingTextSize()) { 25 | 'xs' => 'text-xs', 26 | 'sm' => 'text-sm', 27 | 'md' => 'text-md', 28 | 'lg' => 'text-lg', 29 | default => 'text-sm', 30 | }; 31 | 32 | $imageCount = 0; 33 | @endphp 34 | 35 |
merge($getExtraAttributes())->class([ 36 | 'filament-tables-stacked-image-column', 37 | 'px-4 py-3' => ! $isInline(), 38 | ]) }}> 39 |
40 |
'space-x-0', 45 | 1 => '-space-x-1', 46 | 2 => '-space-x-2', 47 | 3 => '-space-x-3', 48 | 4 => '-space-x-4', 49 | default => '-space-x-1', 50 | }, 51 | ]) 52 | > 53 | @foreach ($imagesWithPath as $image) 54 | @php 55 | $imageCount ++; 56 | $path = $getPath($image); 57 | @endphp 58 | 59 | class([ 67 | 'max-w-none ring-white object-cover object-center', 68 | 'dark:ring-gray-800' => config('tables.dark_mode'), 69 | 'rounded-full' => $isCircular(), 70 | $ring, 71 | ]) }} 72 | > 73 | @endforeach 74 | 75 | @if ($shouldShowRemaining() && (! $shouldShowRemainingAfterStack()) && ($imageCount < count($images))) 76 |
config('tables.dark_mode'), 84 | 'rounded-full' => $isCircular(), 85 | $remainingTextSize, 86 | $ring, 87 | ]) 88 | > 89 | 90 | +{{ count($images) - $imageCount }} 91 | 92 |
93 | @endif 94 | 95 |
96 | 97 | @if ($shouldShowRemaining() && $shouldShowRemainingAfterStack() && ($imageCount < count($images))) 98 |
config('tables.dark_mode'), 102 | $remainingTextSize, 103 | ]) 104 | > 105 | +{{ count($images) - $imageCount }} 106 |
107 | @endif 108 | 109 |
110 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stacked Image Column for Filament 2 | 3 | Stacked Image Column allows you to display multiple images as a stack in your Filament tables. 4 | 5 | ## Screenshots 6 | 7 | ![stacked](https://user-images.githubusercontent.com/6097099/241840492-876214e1-0241-4919-ba4d-95ca0dc118ea.png) 8 | 9 | ![stacked-dark](https://user-images.githubusercontent.com/6097099/241840487-18196356-a25a-444d-9b32-76cd09618a11.png) 10 | 11 | ## Installation 12 | 13 | You can install the package via composer: 14 | 15 | ```bash 16 | composer require archilex/filament-stacked-image-column 17 | ``` 18 | 19 | Optionally, you can publish the views using 20 | 21 | ```bash 22 | php artisan vendor:publish --tag="filament-stacked-image-column-views" 23 | ``` 24 | 25 | ## Usage 26 | 27 | Normally you will use Stacked Image Column to show a relationship of images. The name of the relationship comes first, followed by a period, followed by the name of the column to display: 28 | 29 | ```php 30 | use Archilex\StackedImageColumn\Columns\StackedImageColumn; 31 | 32 | return $table 33 | ->columns([ 34 | StackedImageColumn::make('orderItems.image'), 35 | ]); 36 | ``` 37 | 38 | ### Using a separator 39 | 40 | Instead of using a relationship, you may use a separated string by passing the separator into `separator()`: 41 | 42 | ```php 43 | StackedImageColumn::make('product_images') 44 | ->separator(',') 45 | ``` 46 | 47 | ### Customizing the images 48 | 49 | As `StackedImageColumn` extends Filament's `ImageColumn`, you have access to most of the same methods: 50 | 51 | ```php 52 | StackedImageColumn::make('images') 53 | ->circular() 54 | ->width(20) 55 | ``` 56 | 57 | ### Setting a limit 58 | 59 | You may set a limit to the number of images you want to display by passing `limit()`: 60 | 61 | ```php 62 | StackedImageColumn::make('orderItems.image') 63 | ->circular() 64 | ->limit(3) 65 | ``` 66 | 67 | ### Showing the remaining images count 68 | 69 | When you set a limit you may also display the count of remaining images by passing `showRemaining()`. 70 | 71 | ```php 72 | StackedImageColumn::make('orderItems.image') 73 | ->circular() 74 | ->limit(3) 75 | ->showRemaining() 76 | ``` 77 | 78 | By default, `showRemaining()` will display the count of remaining images as a number stacked on the other images. If you prefer to show the count as a number after the images you may use `showRemainingAfterStack()`. You may also set the text size by using `remainingTextSize('xs')`; 79 | 80 | ### Customizing the ring width 81 | 82 | The default ring width is `ring-3` but you may customize the ring width to be either `0`, `1`, `2`, or `4` which correspond to tailwinds `ring-widths`: `ring-0`, `ring-1`, `ring-2`, and `ring-4` respectively. 83 | 84 | ```php 85 | StackedImageColumn::make('users.avatar') 86 | ->circular() 87 | ->ring(3) 88 | ``` 89 | 90 | ### Customizing the overlap 91 | 92 | The default overlap is `-space-x-1` but you may customize the overlap to be either `0`, `1`, `2`, `3`, or `4` which correspond to tailwinds `space-x` options: `space-x-0`, `-space-x-1`, `-space-x-2`, `-space-x-3`, and `-space-x-4` respectively. 93 | 94 | ```php 95 | StackedImageColumn::make('users.avatar') 96 | ->circular() 97 | ->overlap(3) 98 | ``` 99 | 100 | ## Testing 101 | 102 | ```bash 103 | composer test 104 | ``` 105 | 106 | ## Changelog 107 | 108 | Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. 109 | 110 | ## Contributing 111 | 112 | Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details. 113 | 114 | ## Security Vulnerabilities 115 | 116 | Please review [our security policy](../../security/policy) on how to report security vulnerabilities. 117 | 118 | ## Credits 119 | 120 | - [Kenneth Sese](https://github.com/archilex) 121 | - [All Contributors](../../contributors) 122 | 123 | ## Other Filament Plugins 124 | 125 | Check out my other Filament Plugins: 126 | 127 | - [Filter Sets](https://filamentphp.com/plugins/filter-sets): Save your filters, search query, column order, and column search queries into easily accessible filter sets 128 | - [Toggle Icon Column](https://filamentphp.com/plugins/toggle-icon-column): Display a toggleable icon in your Filament table. 129 | 130 | 131 | ## License 132 | 133 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 134 | -------------------------------------------------------------------------------- /src/Columns/StackedImageColumn.php: -------------------------------------------------------------------------------- 1 | disk(config('tables.default_filesystem_disk')); 40 | } 41 | 42 | public function disk(string | Closure | null $disk): static 43 | { 44 | $this->disk = $disk; 45 | 46 | return $this; 47 | } 48 | 49 | public function getDisk(): Filesystem 50 | { 51 | return Storage::disk($this->getDiskName()); 52 | } 53 | 54 | public function getDiskName(): string 55 | { 56 | return $this->evaluate($this->disk) ?? config('tables.default_filesystem_disk'); 57 | } 58 | 59 | public function getImages(): array 60 | { 61 | $images = $this->getState(); 62 | 63 | if (is_array($images)) { 64 | return $images; 65 | } 66 | 67 | if (! ($separator = $this->getSeparator())) { 68 | return []; 69 | } 70 | 71 | $images = explode($separator, $images); 72 | 73 | if (count($images) === 1 && blank($images[0])) { 74 | $images = []; 75 | } 76 | 77 | return $images; 78 | } 79 | 80 | public function getImagesWithPath(): array 81 | { 82 | return collect($this->getImages()) 83 | ->filter(fn ($image) => $this->getPath($image) !== null) 84 | ->take($this->getLimit()) 85 | ->toArray(); 86 | } 87 | 88 | public function separator(string | Closure | null $separator = ','): static 89 | { 90 | $this->separator = $separator; 91 | 92 | return $this; 93 | } 94 | 95 | public function getSeparator(): ?string 96 | { 97 | return $this->evaluate($this->separator); 98 | } 99 | 100 | public function getPath(string $image = null): ?string 101 | { 102 | $state = $image ?? $this->getState(); 103 | 104 | if (! $state) { 105 | return null; 106 | } 107 | 108 | if (filter_var($image, FILTER_VALIDATE_URL) !== false) { 109 | return $state; 110 | } 111 | 112 | /** @var FilesystemAdapter $storage */ 113 | $storage = $this->getDisk(); 114 | 115 | try { 116 | if (! $storage->exists($image)) { 117 | return null; 118 | } 119 | } catch (UnableToCheckFileExistence $exception) { 120 | return null; 121 | } 122 | 123 | if ($this->getVisibility() === 'private') { 124 | try { 125 | return $storage->temporaryUrl( 126 | $state, 127 | now()->addMinutes(5), 128 | ); 129 | } catch (Throwable $exception) { 130 | // This driver does not support creating temporary URLs. 131 | } 132 | } 133 | 134 | return $storage->url($state); 135 | } 136 | 137 | public function visibility(string | Closure $visibility): static 138 | { 139 | $this->visibility = $visibility; 140 | 141 | return $this; 142 | } 143 | 144 | public function getVisibility(): string 145 | { 146 | return $this->evaluate($this->visibility); 147 | } 148 | 149 | public function extraImgAttributes(array | Closure $attributes, bool $merge = false): static 150 | { 151 | if ($merge) { 152 | $this->extraImgAttributes[] = $attributes; 153 | } else { 154 | $this->extraImgAttributes = [$attributes]; 155 | } 156 | 157 | return $this; 158 | } 159 | 160 | public function getExtraImgAttributes(): array 161 | { 162 | $temporaryAttributeBag = new ComponentAttributeBag(); 163 | 164 | foreach ($this->extraImgAttributes as $extraImgAttributes) { 165 | $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraImgAttributes)); 166 | } 167 | 168 | return $temporaryAttributeBag->getAttributes(); 169 | } 170 | 171 | public function getExtraImgAttributeBag(): ComponentAttributeBag 172 | { 173 | return new ComponentAttributeBag($this->getExtraImgAttributes()); 174 | } 175 | 176 | public function limit(int | Closure | null $limit = 3): static 177 | { 178 | $this->limit = $limit; 179 | 180 | return $this; 181 | } 182 | 183 | public function getLimit(): ?int 184 | { 185 | return $this->evaluate($this->limit); 186 | } 187 | } 188 | --------------------------------------------------------------------------------