Kendo UI datasource for Laravel
ericli1018/laravel-kendo-ui-datasource is a Laravel package for kendo ui datasource for laravel.
It currently has 0 GitHub stars and 138 downloads on Packagist (latest version 1.0.13).
Install it with composer require ericli1018/laravel-kendo-ui-datasource.
Discover more Laravel packages by ericli1018
or browse all Laravel packages to compare alternatives.
Last updated
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
Laravel 7 | Laravel 8 | Laravel 9 --------- | --------- | ----------- v1.* | v1.* | v1.*
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',
)
$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];
$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];