/**
  * 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'));
 }
示例#2
0
 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));
 }
 public function getManage(Request $request)
 {
     $files = File::orderBy('updated_at', 'desc')->paginate(15);
     return view("file.manage")->withFiles($files);
 }
    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']);