当前位置: 首页>>代码示例>>PHP>>正文


PHP File::orderBy方法代码示例

本文整理汇总了PHP中app\File::orderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP File::orderBy方法的具体用法?PHP File::orderBy怎么用?PHP File::orderBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\File的用法示例。


在下文中一共展示了File::orderBy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //Find all File
     $files = File::orderBy('type', 'asc')->get();
     //Send the your to the index page
     return view('admin.file.index', compact('files'));
 }
开发者ID:victorfdt,项目名称:theliteracycenter,代码行数:12,代码来源:FilesController.php

示例2: getFilesWithPaginate

 public function getFilesWithPaginate(Request $request)
 {
     $perPage = $request->get('num');
     if (!is_numeric($perPage) || $perPage < 1 || $perPage > 30) {
         $perPage = 15;
     }
     $files = FileModel::orderBy('id', 'desc')->paginate($perPage);
     return $this->buildResponse(trans('api.file.paginate.success'), Tools::toArray($files));
 }
开发者ID:lialosiu,项目名称:amaoto-core,代码行数:9,代码来源:FileController.php

示例3: getManage

 public function getManage(Request $request)
 {
     $files = File::orderBy('updated_at', 'desc')->paginate(15);
     return view("file.manage")->withFiles($files);
 }
开发者ID:ChenPeiyuan,项目名称:student-infomation-manager,代码行数:5,代码来源:FileManageController.php

示例4: function

    Route::get('/home', function () {
        return view('home');
    });

    Route::controllers([
        'changepassword' => 'Auth\ChangePasswordController',
        'log' => 'LogController',
        'studentview' => 'StudentViewController',
    ]);
});

Route::group(['middleware' => 'admin'], function () {
    Route::controllers([
        'usermanage' => 'UserManageController',
        'studentmanage' => 'StudentManageController',
    ]);
});
*/
use App\StudentManageLog;
use App\File;
Route::get('/', function () {
    $pages = StudentManageLog::where("review", "0")->orderBy('created_at', 'desc')->paginate(15);
    $files = File::orderBy('updated_at', 'desc')->take(15)->get();
    return view('home')->withPages($pages)->withFiles($files);
});
Route::get('/home', function () {
    $pages = StudentManageLog::where("review", "0")->orderBy('created_at', 'desc')->paginate(15);
    $files = File::orderBy('updated_at', 'desc')->take(15)->get();
    return view('home')->withPages($pages)->withFiles($files);
});
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'changepassword' => 'Auth\\ChangePasswordController', 'log' => 'LogController', 'studentview' => 'StudentViewController', 'usermanage' => 'UserManageController', 'studentmanage' => 'StudentManageController', 'countrymanage' => 'CountryManageController', 'excel' => 'PHPExcelController', 'tuition' => 'TuitionController', 'file' => 'FileManageController', 'statistic' => 'StatisticController', 'generate' => 'GenerateTableController', 'graduate' => 'GraduateController']);
开发者ID:ChenPeiyuan,项目名称:student-infomation-manager,代码行数:31,代码来源:routes.php


注:本文中的app\File::orderBy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。