caffeinated/plugins 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

caffeinated/plugins

最新稳定版本:v2.2

Composer 安装命令:

composer require caffeinated/plugins

包简介

Laravel 5 Plugins

README 文档

README

Caffeinated Plugins

Laravel 5.1 Laravel 5.2 Source License

Abstraction layer between Blade/Twig to allow the means to "plug in" data through a consistent interface.

Quick Installation

Begin by installing the package through Composer.

composer require caffeinated/plugins=~2.0

Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:

Service Provider

Caffeinated\Plugins\PluginsServiceProvider::class,

Facade

'Plugin' => Caffeinated\Plugins\Facades\Plugin::class,

And that's it! With your coffee in reach, start plugging in some data!

Quick Usage

Build your plugin: app\Plugins\YourPlugin.php

<?php
namespace App\Plugins;

class YourPlugin
{
	public function run()
	{
		return 'Whatever you want';
	}
}

Register your plugin, ideally within a service provider:

Plugin::register('plugin_name', 'App\Plugins\YourPlugin');

Now simply use it!

{{ @plugin_name() }}  // Echo's "whatever you want" in this case

统计信息

  • 总下载量: 854
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 25
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-25