alexdover/blade-set
Larablocks Analysis
alexdover/blade-set works with Laravel 4 (latest release v1.0.4, Oct 3, 2017), 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: Oct 3, 2017)
- 38 downloads a month (needs 10,000)
- 23 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Oct 3, 2017.
- No releases in the last 12 months.
- First released: Jun 9, 2014.
- Monthly downloads: 38, up 850% from six months ago.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require alexdover/blade-set |
|
| Latest Version: | v1.0.4 |
| PHP: | >=5.3.0 |
| Laravel: | 4 |
| License: | MIT |
| Last Updated: | Oct 3, 2017 |
| Links: | GitHub · Packagist |
Laravel 4 Blade @set operator
A very simple blade extension which allows variables to be set.
Current version is for Laravel 4.2.
If you wish to use with Laravel 4.1, please use v1.0.2
Example
@set('my_variable', $existing_variable)
You can then use the variable $my_variable in the template.
You might choose to fetch a bunch of models from your template, for example
@set('my_model_list', MyModel::where('something', '=', 1)->paginate(10))
Why?
Compare
<?php $my_model_list = MyModel::where('something', '=', 1)->paginate(10); ?>
to
@set('my_model_list', MyModel::where('something', '=', 1)->paginate(10))
I felt that the use of the @set was a more elegant solution in the context of blade templates.
Installation
Require this package in your composer.json and update composer. This will download the package.
"alexdover/blade-set": "1.*"
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
'Alexdover\BladeSet\BladeSetServiceProvider',
All done!
Licence
You can use this package under the MIT license
Feedback
If you have any questions, feature requests or constructive ctritcism then please get in touch.
Twitter - @alexdover
Related Packages
Use the simple and yet powerful Laravel Blade templating engine as a standalone...
Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian plu...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.0.4 | >=5.3.0 | 4.2.* | MIT | |
| v1.0.3 | >=5.3.0 | 4.2.* | MIT | |
| v1.0.2 | >=5.3.0 | 4.1.* | MIT | |
| v1.0.1 | >=5.3.0 | 4.1.* | MIT | |
| v1.0 | >=5.3.0 | 4.1.* | MIT |