本文整理汇总了PHP中DataGrid::make方法的典型用法代码示例。如果您正苦于以下问题:PHP DataGrid::make方法的具体用法?PHP DataGrid::make怎么用?PHP DataGrid::make使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataGrid
的用法示例。
在下文中一共展示了DataGrid::make方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
Route::get('standard', function () {
return View::make('standard');
});
Route::get('infinite', function () {
return View::make('infinite');
});
Route::get('group', function () {
return View::make('group');
});
// Route::get('advanced', function()
// {
// return View::make('advanced');
// });
// Route::get('multiple', function()
// {
// return View::make('multiple');
// });
// Route::get('adv', function()
// {
// return View::make('adv');
// });
Route::get('source', function () {
$columns = array('id', 'country', 'subdivision', 'city', 'population', 'created_at');
$settings = array('sort' => 'country', 'direction' => 'asc', 'max_results' => 20);
// // Initiate by a database query
// return DataGrid::make(DB::table('cities'), $columns, $settings);
// // Or by an Eloquent model query
// return DataGrid::make(with(new City)->newQuery(), $columns, $settings);
// Or by an Eloquent model
return DataGrid::make(new City(), $columns, $settings);
});
示例2: function
// $data = App\LotInfo::whereIn('lot_id', $lots)
// ->orderBy('created_at', 'desc')->first()
// ->groupBy('lot_num')
// ->distinct()
// ->with(
// [
// 'statusdef',
// 'buildtype',
// 'user'
// ]);
// // Initiate by a database query
// return DataGrid::make(DB::table('cities'), $columns, $settings);
// // Or by an Eloquent model query
// return DataGrid::make(with(new City)->newQuery(), $columns, $settings);
// Or by an Eloquent model
return DataGrid::make($data, $columns, $settings);
});
Route::get('api/lotinfo/{lotid}', 'LotInfosController@getLotInfo');
Route::put('api/lotinfo/{lotid}', 'LotInfosController@store');
Route::post('api/lotinfo/{lotid}', 'LotInfosController@store');
Route::get('api/lotinfo/buildtype/{buildtypeid}', 'LotInfosController@getStatusMenu');
// Route::get('/mapa', 'LotInfosController@alpha');
// Route::get('api/mapselection/getcommunities/{community_id}', 'MapSelectionController@');
// Route::get('api/mapselection/subdivision/{subdivision_id}', 'MapSelectionController@buildSubdivisions');
Route::get('api/mapselection/getsubdivisions/{communityid}', 'MapSelectionController@buildSubdivisions');
Route::get('api/mapselection/getmaps/{subdivisionid}', 'MapSelectionController@buildMaps');
Route::post('api/mapselection/goto/{mapid}', 'MapSelectionController@gotoMap');
Route::get('loadmap/{mapid}', 'LotInfosController@loadMapInfos');
// Going to need to update this soon to not be static!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Route::get('mapselection', function () {
// $communities = App\Community::where('id', 1)->get();