acidjazz/larjectus
Composer 安装命令:
composer require acidjazz/larjectus
包简介
Adds the power of objectus to Laravel and Lumen
README 文档
README
Allows you to use Objectus seamlessly in Laravel 5 and Lumen
What this does
- Combines your
.envandconfig/options with as many YAML and JSON files and directories you want to add insideconfig/ - Allows for functionality to share this data in any language(s) your
resources/orpublic/folders might use
Why would I want this
Most all of my projects have extended configuration, everything from style guides to site copy, this allows stylus/css and coffeescript/javascript access to this data
Requirements
Installation
Require this package with Composer
composer require acidjazz/larjectus
Laravel
Once Composer has installed or updated your packages you need to register Larjectus with Laravel itself. Open up config/app.php and find the providers key, towards the end of the file, and add 'Larjectus\ServiceProvider', to the end:
'providers' => [ ... Larjectus\ServiceProvider::class, ],
Lumen
For usage with Lumen, add the service provider in bootstrap/app.php.
$app->register(Larjectus\ServiceProvider::class);
configuration
gulpfile.js example(s)
Your gulp task is different from how Objectus works, here is an example of compiling a JSON version of your config for JavaScript access:
🚨 Note the secure array where i remove any secure data, like DB passwords and AWS credentials. 🚨
exec = require('child_process').exec; objectify = function() { var config, secure; config = {}; secure = ['auth', 'database']; return exec('php artisan larjectus:config', function(error, result, stderr) { var dim, i, len, pubconfig; if (error) { notify(error); } this.config = JSON.parse(result); pubconfig = this.config; for (i = 0, len = secure.length; i < len; i++) { dim = secure[i]; delete pubconfig[dim]; } return fs.writeFileSync('public/js/config.js', "config="+JSON.stringify(pubconfig)+";", 'utf8'); }); }; objectify(); gulp.task('larjectus', objectify); gulp.task('watch', function() { gulp.watch('config/**/*', ['larjectus']); );
Here is an example of giving config access to stylus you would need the sample gulp task above :
stylus = require('gulp-stylus'); gulp.task('stylus', function() { return gulp.src('resources/stylus/main.styl') .pipe(stylus({ rawDefine: { config: config } }).on('error', notify.onError(function(error) { return { title: 'Stylus error: ' + error.name, message: error.message, sound: 'Pop' }; }))) .pipe(gulp.dest('public/css/')) .pipe(sync.stream()); }
acidjazz/larjectus 适用场景与选型建议
acidjazz/larjectus 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 357 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 07 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「lumen」 「objectus」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 acidjazz/larjectus 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 acidjazz/larjectus 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 acidjazz/larjectus 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Testing Suite For Lumen like Laravel does.
Stackdriver handler for Monolog (codeinternetapplications/monolog-stackdriver Fork).
Class to generate a standard structure for api json responses
Amqp classes
Audit changes of your Eloquent models in Laravel/Lumen
Laravel, Lumen and Native php elasticseach query builder to build complex queries using an elegant syntax
统计信息
- 总下载量: 357
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-24




