定制 sukohi/memento 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

sukohi/memento

最新稳定版本:2.0.2

Composer 安装命令:

composer require sukohi/memento

包简介

A PHP package mainly developed for Laravel to check result using boolean value.

README 文档

README

A PHP package mainly developed for Laravel to check result using boolean value.
(This is for Laravel 5+. For Laravel 4.2)

Installation

Add this package name in composer.json

"require": {
  "sukohi/memento": "2.*"
}

Execute composer command.

composer update

Register the service provider in app.php

'providers' => array(  
    ...Others...,  
    Sukohi\Memento\MementoServiceProvider::class,
)

Also alias

'aliases' => array(  
    ...Others...,  
    'Memento'   => Sukohi\Memento\Facades\Memento::class
)

Usage

$boolean = true;
$memento = \Memento::set($boolean)
            ->set(function(){

                return \Item::where('id', 1)->exists();

            });

if($memento->allTrue()) {

    echo 'All True';

}

if($memento->allFalse()) {

    echo 'All False';

}

if($memento->hasTrue()) {

    echo 'Has True';

}

if($memento->hasFalse()) {

    echo 'Has False';

}

License

This package is licensed under the MIT License.

Copyright 2015 Sukohi Kuhoh

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-31