承接 ensphere/container 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ensphere/container

最新稳定版本:1.1.0

Composer 安装命令:

composer require ensphere/container

包简介

Maps classes to certain areas to inject processes and views.

README 文档

README

Maps classes to certain areas to inject processes and views.

## Getting started

composer require ensphere/container:1.*

add the service provider

Ensphere\Container\Providers\ServiceProvider::class

register the middleware in the web group

Ensphere\Container\Http\Middleware\Validate::class

Define a binding area

$container = $app['ensphere.container'];
$container->register( 'dashboard-top-bar' )

Supply functionality

create a content stub.

use Ensphere\Container\Content;
use Illuminate\Http\Request;

class Stub extends Content {

	/**
	 * the view to be rendered in said area
	 * @var string
	 */
	protected $view = 'views.view';

	/**
	 * Validates pass instance of Validator back to the container to validate this section.
	 * @param  Request $request - Illuminate\Http\Request
	 * @return Instance of Illuminate\Contracts\Validation\Validator
	 */
	public function validate( Request $request  )
	{

	}

	/**
	 * called once all validation has passed from other areas.
	 * @param  Request $request - Illuminate\Http\Request
	 * @return NULL
	 */
	public function process( Request $request )
	{

	}

}

Bind the stub to the area

$container->bind( 'dashboard-top-bar', [
	Namespace\To\Your\Stub::class
]);

Render the views

$topBar = $container->render( 'dashboard-top-bar' );

The MIT License (MIT)

Copyright (c) 2016 ensphere

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

统计信息

  • 总下载量: 2.01k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固