kindari/blade-alternator
Larablocks Analysis
kindari/blade-alternator works with Laravel 4 (latest release 1.0.2, Sep 5, 2013), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 4, past end of life
- No release in the last 12 months (last: Sep 5, 2013)
- 0 downloads a month (needs 10,000)
- 5 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Sep 5, 2013.
- No releases in the last 12 months.
- First released: Sep 4, 2013.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require kindari/blade-alternator |
|
| Latest Version: | 1.0.2 |
| PHP: | >=5.3.0 |
| Laravel: | 4 |
| Last Updated: | Jun 27, 2016 |
| Links: | GitHub · Packagist |
Blade Alternator
Blade Alternator is a small extension to blade that adds the common operation of changing values throughout a loop. Now thats a horrible description, so heres an example:
@foreach($users as $user)
<tr class="@alternate('odd', 'even')">...</tr>
@endforeach
Which would result in alternating rows of a table, with the class switching between odd and even every time. This works with any number of arguments, for example, you might see a image gallery with three columns.
@foreach($images as $image)
<img src="{{ $img->url }}" class="@alternate('left', 'mid', 'right')" />
@endforeach
Installation
Add kindari/blade-alternator to composer.json.
"kindari/blade-alternator": "1.0.*"
Run composer update to pull down the latest version of Blade Alternator. Now open up app/config/app.php and add the service provider to your providers array, after the ViewServiceProvider.
'providers' => array(
...
'Illuminate\View\ViewServiceProvider',
'Kindari\BladeAlternator\BladeAlternatorServiceProvider',
...
)
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.2 | >=5.3.0 | 4.0.x | ||
| 1.0.1 | >=5.3.0 | 4.0.x | ||
| 1.0.0 | >=5.3.0 | 4.0.x |