<?php
Route::get('/dashboard', 'Admin\DashboardController@index')->name('admin.dashboard');
Route::post('/logout', 'AdminAuth\LoginController@logout')->name('admin.logout');
Route::get('/profile/change', 'Admin\AdminController@edit_profile');
Route::post('/profile/update', 'Admin\AdminController@update_profile')->name('admin.profile.update');

Route::get('/ajax-get/{name}', 'Admin\AjaxController@ajaxGET')->name('ajax-get');

Route::get('/permissions', 'Admin\PermissionController@index');
Route::get('/permissions/create', 'Admin\PermissionController@create');
Route::post('permissions/store', 'Admin\PermissionController@store')->name('admin.permissions.store');
Route::get('/permissions/view/{id}', 'Admin\PermissionController@show');
Route::get('/permissions/status/{id}', 'Admin\PermissionController@statusUpdate');
Route::get('/permissions/edit/{id}', 'Admin\PermissionController@edit');
Route::post('/permissions/update/{id}', ['as' => 'admin.permissions.update', 'uses' => 'Admin\PermissionController@update']);
Route::delete('/permissions/delete/{id}', ['as' => 'admin.permissions.delete', 'uses' => 'Admin\PermissionController@destroy']);

Route::get('/roles', 'Admin\RoleController@index');
Route::get('/roles/create', 'Admin\RoleController@create');
Route::post('/roles/store', ['as' => 'admin.roles.store', 'uses' => 'Admin\RoleController@store']);
Route::get('/roles/view/{id}', 'Admin\RoleController@show');
Route::get('/roles/edit/{id}', 'Admin\RoleController@edit');
Route::post('/roles/update/{id}', ['as' => 'admin.roles.update', 'uses' => 'Admin\RoleController@update']);
Route::delete('/roles/delete/{id}', ['as' => 'admin.roles.delete', 'uses' => 'Admin\RoleController@destroy']);

Route::get('/admins', 'Admin\AdminController@index');
Route::get('/admins/create', 'Admin\AdminController@create');
Route::post('/admins/store', ['as' => 'admin.admins.store', 'uses' => 'Admin\AdminController@store']);
Route::get('/admins/view/{id}', 'Admin\AdminController@show');
Route::get('/admins/edit/{id}', 'Admin\AdminController@edit');
Route::post('/admins/update/{id}', ['as' => 'admin.admins.update', 'uses' => 'Admin\AdminController@update']);
Route::delete('/admins/delete/{id}', ['as' => 'admin.admins.delete', 'uses' => 'Admin\AdminController@destroy']);
Route::get('/admins/status/{id}', 'Admin\AdminController@statusUpdate');

Route::get('/destinations', 'Admin\ListController@destinations');
Route::get('/institutes', 'Admin\ListController@institutes');
Route::get('/campuses', 'Admin\ListController@campuses');
Route::get('/levels', 'Admin\ListController@levels');

Route::get('/courses', 'Admin\CourseController@index');
Route::get('/courses/load', 'Admin\CourseController@load');
Route::get('/courses/create', 'Admin\CourseController@create');
Route::post('courses/store', 'Admin\CourseController@store')->name('admin.courses.store');
Route::get('/courses/view/{id}', 'Admin\CourseController@show');
Route::get('/courses/edit/{id}', 'Admin\CourseController@edit');
Route::post('/courses/update/{id}', ['as' => 'admin.courses.update', 'uses' => 'Admin\CourseController@update']);
Route::delete('/courses/delete/{id}', ['as' => 'admin.courses.delete', 'uses' => 'Admin\CourseController@destroy']);

Route::get('/institutes/edit_entry_req/{institute}/{course}', 'Admin\CourseController@edit_entry_req');
Route::post('/institutes/update_entry_req/{id}', ['as' => 'admin.courses.updateEntryReq', 'uses' => 'Admin\CourseController@update_entry_req']);

Route::get('/courses/bulk-entry', 'Admin\CourseController@bulkEntry');
Route::post('courses/bulk-entry/store', 'Admin\CourseController@storeExcel')->name('admin.courses.store.bulk');
Route::get('/courses/bulk-template/download', 'Admin\CourseController@downloadBulkTemplate');