sukohi/form-autocomplete
Composer 安装命令:
composer require sukohi/form-autocomplete
包简介
A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.
README 文档
README
A PHP package mainly developed for Laravel to generate javascript tag for auto-complete through jQuery UI.
(This is for Laravel 5+. For Laravel 4.2)
Installation
Add this package name in composer.json
"require": {
"sukohi/form-autocomplete": "2.*"
}
Execute composer command.
composer update
Register the service provider in app.php
'providers' => [
...Others...,
Sukohi\FormAutocomplete\FormAutocompleteServiceProvider::class,
]
Also alias
'aliases' => [
...Others...,
'FormAutocomplete' => Sukohi\FormAutocomplete\Facades\FormAutocomplete::class
]
Requirement
Usage
(in View)
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<!-- jQuery UI -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<!-- Input -->
<input id="title_1" type="text">
<input id="title_2" type="text">
<input id="title_3" type="text">
<script>
$(document).ready(function(){
// Using Array
{!! FormAutocomplete::selector('#title_1')->source(['aaaaa', 'bbbbb', 'cccccc']) !!}
// Using Closure
{!! FormAutocomplete::selector('#title_2')->source(function(){
return \Item::where('id', '>', 2)->lists('title'); // You need to return array values.
}) !!}
// Using Table and column
{!! FormAutocomplete::selector('#title_3')->db('items', 'title') !!}
});
</script>
License
This package is licensed under the MIT License.
Copyright 2015 Sukohi Kuhoh
sukohi/form-autocomplete 适用场景与选型建议
sukohi/form-autocomplete 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 889 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 05 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 sukohi/form-autocomplete 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sukohi/form-autocomplete 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 889
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-20