小型框架,简化项目创建过程。

安装: 23

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

语言:JavaScript

v1.0.7 2019-12-20 14:05 UTC

This package is auto-updated.

Last update: 2024-09-17 00:04:13 UTC


README

Easy
EASY

小型框架,简化项目创建过程。

Stars Forks Tag Issues Total Downloads Latest Stable Version License

安装

项目
$ composer create-project --prefer-dist worldvisual/easy SEU_PROJETO
$ cd SEU_PROJETO
$ composer dump-autoload -o

开始使用

// DIR -> (app/config.inc.php)

/**
 * DATABASE CONNECTION
 */

 'hostname' => 'localhost',
 'username' => 'root',
 'password' => '',
 'database' => 'easy',

 /**
 * SITENAME
 * -- host:  yoursite.com.br or yoursite.com.br/sub
 * -- local: localhost or localhost/sub
 */

 'sitename' => 'localhost',

 /**
 * PROTOCOL
 * http://
 * https://
 */

 'protocol' => 'http://',

 /**
 * THEME AND RESOURCES
 */

 'themedir' => 'default',
 'template' => 'default',
 'resource' => 'default'

路由

您可以在 (routes/web.php) 中定义您的路由,更多详细信息可以参考 NEZAMY - GIT

视图

在 (public/themes/SEU_TEMA) 中使用 | 在 config.inc 中定义

布局

在 (public/__templates/SEU_TEMPLATE) 中使用 | 在 config.inc 中定义

使用

- 列出特定表的全部记录
$query->selectAll('table');
- 列出满足特定条件的记录
$query->selectWhere('table', 'id=1');
- 列表返回不重复的结果 (DISTINCT)
$query->selectWhere('column1, column2', 'table', 'id=1');
- 按id返回结果
$query->selectById('table', '1');
- 在数据库中插入信息
$query->Query('table', $array, 'insert');
- 更新数据库中的信息
$query->Query('table', $array, 'update', 'id=1');