當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataGrid::make方法代碼示例

本文整理匯總了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);
});
開發者ID:mehulsbhatt,項目名稱:demo-data-grid,代碼行數:31,代碼來源:routes.php

示例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();
開發者ID:blargent,項目名稱:pimplot,代碼行數:31,代碼來源:routes.php


注:本文中的DataGrid::make方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。