* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It is a breeze. Simply tell Lumen the URIs it should respond to | and give it the Closure to call when that URI is requested. | */ /** * 基础业务模块 */ Route::group(['namespace' => 'Base'], function () { //登录 Route::post('/auth/login', 'AuthController@login'); Route::post('/auth/send-validation-code', 'AuthController@sendValidationCode'); Route::post('/auth/retrieve-password', 'AuthController@retrievePassword'); Route::post('/auth/find-email', 'AuthController@findEmail'); //上传文件 Route::post('/common/upload', 'ResourceController@upload'); //枚举 Route::get('/common/enums', 'CommonController@enums'); Route::get('/common/clear', 'CommonController@clear'); Route::group([ 'middleware' => ['auth:admins', 'auth.role:admin'] ], function () { Route::get('/auth/me', 'AuthController@me'); Route::put('/auth/me', 'AuthController@update'); Route::get('/auth/logout', 'AuthController@logout'); Route::post('/auth/reset-password', 'AuthController@resetPassword'); Route::group(['prefix' => 'base'], function () { //部门管理 Route::get('department', 'DepartmentController@index'); Route::get('department/{id}', 'DepartmentController@show'); Route::post('department', 'DepartmentController@store'); Route::post('department/delete', 'DepartmentController@delete'); Route::put('department/{id}', 'DepartmentController@update'); Route::delete('department/{id}', 'DepartmentController@destroy'); Route::get('department-tree', 'DepartmentController@tree'); //管理员 Route::get('/admin', 'AdminController@index'); Route::get('admin/{id}', 'AdminController@show'); Route::post('admin', 'AdminController@store'); Route::put('admin/{id}', 'AdminController@update'); Route::delete('admin/{id}', 'AdminController@destroy'); Route::post('admin-authorization', 'AdminController@authorization'); Route::get('admin-select-options', 'AdminController@selectOptions'); Route::post('admin-change-password', 'AdminController@changePassword'); Route::post('admin-import', 'AdminController@import'); //角色 Route::get('/role', 'RoleController@index'); Route::get('role/{id}', 'RoleController@show'); Route::post('role', 'RoleController@store'); Route::put('role/{id}', 'RoleController@update'); Route::delete('role/{id}', 'RoleController@destroy'); Route::get('role-lists', 'RoleController@lists'); //菜单 Route::get('/menu', 'MenuController@index'); Route::get('/menu-icons', 'MenuController@icons'); Route::get('menu/{id}', 'MenuController@show'); Route::post('menu', 'MenuController@store'); Route::put('menu/{id}', 'MenuController@update'); Route::delete('menu/{id}', 'MenuController@destroy'); Route::get('menu-tree', 'MenuController@tree'); Route::get('menu-user', 'MenuController@menus'); //轮播图管理 Route::get('banner', 'BannersController@index'); Route::get('banner/{id}', 'BannersController@show'); Route::post('banner', 'BannersController@store'); Route::post('banner/delete', 'BannersController@delete'); Route::put('banner/{id}', 'BannersController@update'); Route::delete('banner/{id}', 'BannersController@destroy'); //商户 Route::get('/shop', 'ShopsController@index'); Route::post('/shop', 'ShopsController@store'); Route::get('/shop/{id}', 'ShopsController@show'); Route::put('/shop/{id}', 'ShopsController@update'); Route::delete('/shop/{id}', 'ShopsController@destroy'); Route::get('/shop-select-options', 'ShopsController@SelectOptions'); //分类管理 Route::get('category', 'CategoriesController@index'); Route::post('category', 'CategoriesController@storeCategory'); Route::post('category-option', 'CategoriesController@store'); Route::get('category/{id}', 'CategoriesController@show'); Route::put('category/{id}', 'CategoriesController@update'); Route::delete('category/{id}', 'CategoriesController@destroy'); Route::post('category-delete', 'CategoriesController@delete'); Route::get('category-select-options', 'CategoriesController@selectOptions'); //参数配置 Route::get('setting', 'SettingsController@index'); Route::get('setting-tree', 'SettingsController@tree'); Route::post('setting', 'SettingsController@store'); Route::put('setting/{id}', 'SettingsController@update'); Route::delete('setting/{id}', 'SettingsController@destroy'); Route::get('setting-key', 'SettingsController@setting'); }); }); }); //高校公用模块 //Route::group([ // 'middleware' => ['auth:admins', 'auth.role:admin'], // 'prefix' => 'school', // 'namespace' => 'School' //], function () { // //学期管理 // Route::get('term', 'TermsController@index'); // Route::post('term', 'TermsController@store'); // Route::get('term/info/{id}', 'TermsController@show'); // Route::get('term/pause', 'TermsController@pause'); // Route::put('term/{id}', 'TermsController@update'); // Route::delete('term/{id}', 'TermsController@destroy'); // Route::post('term-delete', 'TermsController@delete'); // Route::get('term-select-options', 'TermsController@selectOptions'); // // //时间段管理 // Route::get('time', 'TimesController@index'); // Route::post('time', 'TimesController@store'); // Route::get('time/info/{id}', 'TimesController@show'); // Route::get('time/pause', 'TimesController@pause'); // Route::put('time/{id}', 'TimesController@update'); // Route::delete('time/{id}', 'TimesController@destroy'); // Route::post('time-delete', 'TimesController@delete'); // Route::get('time-select-options', 'TimesController@selectOptions'); // // //班级管理 // Route::get('grade', 'GradesController@index'); // Route::post('grade', 'GradesController@store'); // Route::get('grade/info/{id}', 'GradesController@show'); // Route::get('grade/pause', 'GradesController@pause'); // Route::put('grade/{id}', 'GradesController@update'); // Route::delete('grade/{id}', 'GradesController@destroy'); // Route::post('grade-delete', 'GradesController@delete'); // Route::get('grade-select-options', 'GradesController@selectOptions'); // // //老师管理 // Route::get('teacher', 'TeachersController@index'); // Route::post('teacher', 'TeachersController@store'); // Route::get('teacher/info/{id}', 'TeachersController@show'); // Route::get('teacher/pause', 'TeachersController@pause'); // Route::put('teacher/{id}', 'TeachersController@update'); // Route::delete('teacher/{id}', 'TeachersController@destroy'); // Route::post('teacher-delete', 'TeachersController@delete'); // Route::post('teacher-import', 'TeachersController@import'); // Route::post('teacher-export', 'TeachersController@export'); // Route::get('teacher-select-options', 'TeachersController@selectOptions'); // // //学生管理 // Route::get('student', 'StudentsController@index'); // Route::post('student', 'StudentsController@store'); // Route::get('student/info/{id}', 'StudentsController@show'); // Route::get('student/pause', 'StudentsController@pause'); // Route::put('student/{id}', 'StudentsController@update'); // Route::delete('student/{id}', 'StudentsController@destroy'); // Route::post('student-delete', 'StudentsController@delete'); // Route::post('student-import', 'StudentsController@import'); // Route::post('student-export', 'StudentsController@export'); // Route::get('student-select-options', 'StudentsController@selectOptions'); // // //教室管理 // Route::get('room', 'RoomsController@index'); // Route::post('room', 'RoomsController@store'); // Route::get('room/info/{id}', 'RoomsController@show'); // Route::get('room/pause', 'RoomsController@pause'); // Route::put('room/{id}', 'RoomsController@update'); // Route::delete('room/{id}', 'RoomsController@destroy'); // Route::post('room-delete', 'RoomsController@delete'); // Route::get('room-select-options', 'RoomsController@selectOptions'); // // //课程管理 // Route::get('lesson', 'LessonsController@index'); // Route::post('lesson', 'LessonsController@store'); // Route::get('lesson/info/{id}', 'LessonsController@show'); // Route::put('lesson/{id}', 'LessonsController@update'); // Route::delete('lesson/{id}', 'LessonsController@destroy'); // Route::post('lesson-delete', 'LessonsController@delete'); // Route::get('lesson-select-options', 'LessonsController@selectOptions'); // Route::get('lesson/pause', 'LessonsController@pause'); // // //老师课程管理 // Route::get('lesson-teacher', 'LessonTeachersController@index'); // Route::post('lesson-teacher', 'LessonTeachersController@store'); // Route::get('lesson-teacher/pause', 'LessonTeachersController@pause'); //// Route::get('lesson/{id}', 'LessonTeachersController@show'); // Route::put('lesson-teacher/info/{id}', 'LessonTeachersController@update'); // Route::delete('lesson-teacher/info/{id}', 'LessonTeachersController@destroy'); // Route::post('lesson-teacher-delete', 'LessonTeachersController@delete'); // Route::get('lesson-teacher-select-options', 'LessonTeachersController@selectOptions'); // // //上课记录 // Route::post('schedule/calendar', 'ScheduleController@calendar'); // Route::post('schedule/calendar-simple', 'ScheduleController@calendarSimple'); // Route::get('schedule', 'ScheduleController@index'); // Route::get('schedule-lists', 'ScheduleController@lists'); // Route::get('schedule/info/{id}', 'ScheduleController@show'); // Route::get('schedule/pause', 'ScheduleController@pause'); // Route::post('schedule/change', 'ScheduleController@changeLesson'); // Route::post('schedule/history', 'ScheduleController@byTimeGetScheduleLogs'); // Route::put('schedule', 'ScheduleController@store'); // Route::delete('schedule/{id}', 'ScheduleController@destroy'); // Route::post('schedule/batch-stop-lesson', 'ScheduleController@batchStopLesson'); // Route::get('schedule/export', 'ScheduleController@scheduleExport'); // // //停调课管理 // Route::get('schedule/record', 'ScheduleApproveRecordsController@index'); // Route::get('schedule/record/info/{id}', 'ScheduleApproveRecordsController@show'); // Route::get('schedule/record/pause', 'ScheduleApproveRecordsController@pause'); // Route::delete('schedule/record/{id}', 'ScheduleApproveRecordsController@destroy'); // Route::post('schedule/check', 'ScheduleApproveRecordsController@check'); // Route::post('schedule/approve-check', 'ScheduleApproveRecordsController@approveCheck'); // Route::get('schedule/check-progress', 'ScheduleApproveRecordsController@checkProgress'); // Route::get('schedule/approve-record-export', 'ScheduleApproveRecordsController@approveRecordExport'); // //}); //实验中心 //Route::group([ // 'middleware' => ['auth:admins', 'auth.role:admin'], // 'prefix' => 'lab', // 'namespace' => 'Lab' //], function () { // Route::get('home', 'HomeController@index'); // //导入管理 // // Route::get('import/record', 'ImportRecordsController@index'); // Route::post('import/record', 'ImportRecordsController@store'); // Route::get('import/record/{id}', 'ImportRecordsController@show'); // Route::put('import/record/{id}', 'ImportRecordsController@update'); // Route::delete('import/record/{id}', 'ImportRecordsController@destroy'); // Route::post('import/record-delete', 'ImportRecordsController@delete'); // Route::get('import/record-select-options', 'ImportRecordsController@selectOptions'); // Route::get('import/record-statistical', 'ImportRecordsController@statistical'); // Route::get('import/record-change-status', 'ImportRecordsController@changeStatus'); // Route::get('import/retry-import', 'ImportRecordsController@retryImport'); // Route::get('import/check-is-clash', 'ImportRecordsController@checkIsClash'); // // // Route::get('schedule', 'SchedulesController@index'); // Route::get('schedule/lists', 'SchedulesController@lists'); // Route::post('schedule/calendar', 'SchedulesController@calendar'); // Route::post('schedule/calendar-simple', 'SchedulesController@calendarSimple'); // Route::post('schedule/store', 'SchedulesController@storeSchedule'); // Route::post('schedule/update', 'SchedulesController@updateSchedule'); // Route::delete('schedule/delete/{id}', 'SchedulesController@delSchedule'); // Route::get('schedule/info/{id}', 'SchedulesController@show'); // // //维护记录 // Route::get('maintain', 'MaintainsController@index'); // Route::get('maintain-lists', 'MaintainsController@lists'); // Route::post('maintain/', 'MaintainsController@store'); // Route::post('maintain/batch', 'MaintainsController@batchStore'); // Route::get('maintain/info/{id}', 'MaintainsController@show'); // Route::put('maintain/{id}', 'MaintainsController@update'); // Route::delete('maintain/{id}', 'MaintainsController@destroy'); // Route::post('maintain-delete', 'MaintainsController@delete'); // Route::get('maintain-time', 'MaintainsController@byTime'); // Route::get('maintain/pause', 'MaintainsController@pause'); // // //开放预约 // Route::get('open-appointment', 'OpenAppointmentsController@index'); // Route::post('open-appointment', 'OpenAppointmentsController@store'); // Route::get('open-appointment/info/{id}', 'OpenAppointmentsController@show'); // Route::put('open-appointment/info/{id}', 'OpenAppointmentsController@update'); // Route::delete('open-appointment/info/{id}', 'OpenAppointmentsController@destroy'); // Route::post('open-appointment-delete', 'OpenAppointmentsController@delete'); // Route::get('open-appointment/check-progress', 'OpenAppointmentsController@checkProgress'); // Route::post('open-appointment/check', 'OpenAppointmentsController@check'); // Route::post('open-appointment/approve-check', 'OpenAppointmentsController@approveCheck'); // Route::post('open-appointment/upload-print', 'OpenAppointmentsController@uploadPrint'); // Route::get('open-appointment/pause', 'OpenAppointmentsController@pause'); // Route::get('open-appointment/down-print', 'OpenAppointmentsController@downPrint'); // // //账号审批 // Route::get('account', 'AccountAppliesController@index'); // Route::get('account/info/{id}', 'AccountAppliesController@show'); // Route::put('account/info/{id}', 'AccountAppliesController@update'); // Route::post('account/check', 'AccountAppliesController@check'); // Route::post('account/approve-check', 'AccountAppliesController@approveCheck'); // Route::delete('account/info/{id}', 'AccountAppliesController@destroy'); // Route::post('account-delete', 'AccountAppliesController@delete'); // //}); //Route::group([ // 'prefix' => 'lab', // 'namespace' => 'Lab' //], function () { // Route::post('account', 'AccountAppliesController@store'); //}); /** * 电力 */ Route::group([ 'middleware' => ['auth:admins', 'auth.role:admin'], 'prefix' => 'dianli', 'namespace' => 'Dianli' ], function () { Route::get('home', 'HomeController@index'); Route::get('statistical', 'HomeController@statistical'); //任务管理 Route::get('/task', 'TasksController@index'); Route::post('/task', 'TasksController@store'); Route::get('/task/info/{id}', 'TasksController@show'); Route::put('/task/info/{id}', 'TasksController@update'); Route::delete('/task/info/{id}', 'TasksController@destroy'); Route::post('/task-delete', 'TasksController@delete'); Route::get('/task/select-options', 'TasksController@selectOptions'); Route::get('/task/pause', 'TasksController@pause'); Route::post('/task/related-papers', 'TasksController@relatedPapers'); }); /** * 试卷 */ Route::group([ 'middleware' => ['auth:admins', 'auth.role:admin'], 'prefix' => 'exam', 'namespace' => 'Exam' ], function () { Route::get('home', 'HomeController@index'); //任务管理 Route::get('/paper', 'PapersController@index'); Route::post('/paper', 'PapersController@store'); Route::get('/paper/info/{id}', 'PapersController@show'); Route::put('/paper/info/{id}', 'PapersController@update'); Route::delete('/paper/info/{id}', 'PapersController@destroy'); Route::post('/paper/delete', 'PapersController@delete'); Route::get('/paper/select-options', 'PapersController@selectOptions'); Route::get('/paper/pause', 'PapersController@pause'); //试题 Route::get('/topic', 'TopicsController@index'); Route::post('/topic', 'TopicsController@store'); Route::get('/topic/info/{id}', 'TopicsController@show'); Route::put('/topic/info/{id}', 'TopicsController@update'); Route::delete('/topic/info/{id}', 'TopicsController@destroy'); Route::post('/topic/delete', 'TopicsController@delete'); Route::get('/topic/select-options', 'TopicsController@selectOptions'); Route::get('/topic/pause', 'TopicsController@pause'); //考试 Route::get('/paper-result', 'PaperResultsController@index'); Route::post('/paper-result/allot', 'PaperResultsController@allot'); Route::post('/paper-result/answer', 'PaperResultsController@answer'); Route::post('/paper-result', 'PaperResultsController@store'); Route::get('/paper-result/info/{id}', 'PaperResultsController@show'); Route::put('/paper-result/info/{id}', 'PaperResultsController@update'); Route::delete('/paper-result/info/{id}', 'PaperResultsController@destroy'); Route::post('/paper-result/delete', 'PaperResultsController@delete'); Route::get('/paper-result/select-options', 'PaperResultsController@selectOptions'); Route::get('/paper-result/pause', 'PaperResultsController@pause'); }); /** * 通知公告 */ Route::group([ 'middleware' => ['auth:admins', 'auth.role:admin'], 'prefix' => 'news', 'namespace' => 'News' ], function () { //公告 Route::get('notice', 'NoticesController@index'); Route::post('notice', 'NoticesController@store'); Route::put('notice/info/{id}', 'NoticesController@update'); Route::get('notice/info/{id}', 'NoticesController@show'); Route::delete('notice/{id}', 'NoticesController@destroy'); Route::get('notice/pause', 'NoticesController@pause'); //消息列表 Route::get('message', 'MessagesController@index'); Route::post('message', 'MessagesController@store'); Route::put('message/info/{id}', 'MessagesController@update'); Route::get('message/info/{id}', 'MessagesController@show'); Route::delete('message/{id}', 'MessagesController@destroy'); Route::get('message/pause', 'MessagesController@pause'); Route::get('message/users', 'MessagesController@users'); Route::get('message/user-message', 'MessagesController@userMessages'); Route::get('message/read-user-message', 'MessagesController@readMessage'); Route::get('message/read-user-messages', 'MessagesController@readMessages'); }); //课程 Route::group([ 'middleware' => ['auth:admins', 'auth.role:admin'], 'prefix' => 'course', 'namespace' => 'Course' ], function () { // 首页 Route::get('/home', 'HomeController@index'); //课程 //分类 Route::get('category', 'CategoryController@index'); Route::post('category', 'CategoryController@store'); Route::get('category/{id}', 'CategoryController@show'); Route::put('category/{id}', 'CategoryController@update'); Route::delete('category/{id}', 'CategoryController@destroy'); Route::post('category/delete', 'CategoryController@delete'); Route::get('category-tree', 'CategoryController@tree'); //课程 Route::get('info', 'CourseController@index'); Route::post('info', 'CourseController@store'); Route::get('info/{id}', 'CourseController@show'); Route::put('info/{id}', 'CourseController@update'); Route::delete('info/{id}', 'CourseController@destroy'); //章节 Route::get('{course_id}/chapter', 'ChapterController@index'); Route::post('{course_id}/chapter', 'ChapterController@store'); Route::put('chapter/{id}', 'ChapterController@update'); Route::delete('chapter/{id}', 'ChapterController@destroy'); //视频 Route::get('{course_id}/video', 'VideoController@index'); Route::post('{course_id}/video', 'VideoController@store'); Route::get('{course_id}/video/{id}', 'VideoController@show'); Route::put('video/{id}', 'VideoController@update'); Route::delete('video/{id}', 'VideoController@destroy'); //附件 Route::get('video/{course_video_id}/attach', 'AttachController@index'); Route::post('video/{course_video_id}/attach', 'AttachController@store'); Route::put('attach/{id}', 'AttachController@update'); Route::delete('attach/{id}', 'AttachController@destroy'); }); //附件下载 //Route::get('/view/attach-download/{id}', 'Course\AttachController@download'); Route::get('/', function () { return app()->version(); }); //开发环境接口 Route::group(['prefix' => 'develop'], function () { //响应状态 // Route::get('/http-status', 'DevelopController@httpStatus'); Route::get('/t', 'ExampleController@test'); Route::get('/init', 'ExampleController@init'); });