本文整理汇总了PHP中app\Employee::idDescending方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::idDescending方法的具体用法?PHP Employee::idDescending怎么用?PHP Employee::idDescending使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Employee
的用法示例。
在下文中一共展示了Employee::idDescending方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
<?php
use App\Employee;
Route::get('/', function () {
$starters = Employee::idDescending()->get();
return view('home', compact('starters'));
});
Route::get('home', function () {
$starters = Employee::idDescending()->get();
return view('home', compact('starters'));
});
// resource routes...
Route::resource('employee', 'EmployeeController');
Route::resource('apple', 'AppleController');
Route::resource('android', 'AndroidController');
Route::resource('sim', 'SimController');
Route::resource('laptop', 'LaptopController');
Route::resource('desktop', 'DesktopController');
Route::resource('docker', 'DockerController');
Route::resource('monitor', 'MonitorController');
//Assign routes
Route::get('employee/assign/laptop/{id}', 'LaptopController@assign');
Route::get('laptop/assign/{laptop}/{employee}', 'LaptopController@assignLaptop');
Route::get('employee/assign/desktop/{id}', 'DesktopController@assign');
Route::get('desktop/assign/{desktop}/{employee}', 'DesktopController@assignDesktop');
Route::get('employee/assign/apple/{id}', 'AppleController@assign');
Route::get('apple/assign/{apple}/{employee}', 'AppleController@assignApple');
Route::get('employee/assign/android/{id}', 'AndroidController@assign');
Route::get('android/assign/{android}/{employee}', 'AndroidController@assignAndroid');
//Assign SIM routes
Route::get('android/assign/{id}', 'SimController@assignAndroid');