ericli1018/laravel-kendo-ui-datasource
最新稳定版本:1.0.13
Composer 安装命令:
composer require ericli1018/laravel-kendo-ui-datasource
包简介
Kendo UI datasource for Laravel
关键字:
README 文档
README
ESSENTIALLY ALL WORK ON THIS PROJECT WAS ORIGINALLY DONE BY USER meowcakes. I HAVE FORKED THIS FROM ChemProf MERELY TO GIVE MYSELF CONTROL OVER THE DEPENDENCY VERSIONS. I TAKE NO CREDIT OR RESPONSIBILITY FOR THE ORIGINAL SCRIPTS, OTHER THAN THE TRIVIAL ADJUSTMENTS I HAVE MADE.
Server side Kendo UI DataSource implementation for Laravel
Version
| Laravel 7 | Laravel 8 | Laravel 9 |
|---|---|---|
| v1.* | v1.* | v1.* |
Installation
Start by installing Laravel Kendo UI Datasoure if you have not done so already:
composer require ericli1018/laravel-kendo-ui-datasource
To get the latest version simply require it in your composer.json file.
"ericli1018/laravel-kendo-ui-datasource": "dev-main"
(Optional) You can register the facade in the aliases key of your app/config/app.php file.
Default alias is "KendoDataSource".
'aliases' => array(
'KendoDataSource' => 'Ericli1018\LaravelKendoUiDatasource\Facade',
)
Basic Example
$kendoUIDS = KendoDataSource::make( $request->all(), [ // (Optional) specifying table, join table or table alias for query. // 'email' => ['string', 'join_table_name'], 'id' => 'number', 'name' => 'string', 'created_at' => 'date', 'fully_registered' => 'boolean', ], // Option main table name for query // 'main_table_name' ); $query = (new App\Models\User())->newQuery(); $count = $kendoUIDS->execute($query); // Option column name for count // $count = $kendoUIDS->execute($query, 'column name'); return ['data' => $query->get()->toArray(), 'total' => $count];
Example with Table Alias
$kendoUIDS = KendoDataSource::make( $request->all(), [ 'id' => ['number', 'm'], 'email' => ['string'], 'name' => 'string', ], 'm' ); $query = (new App\Models\User())->newQuery()->from('users as m'); $count = $kendoUIDS->execute($query, '`m`.`id`'); return ['data' => $query->get()->toArray(), 'total' => $count];
统计信息
- 总下载量: 138
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-18