<?php

use Illuminate\Support\Facades\Route;

    
	
	
	//Route::post('reset-password', [ForgotPasswordController::class, 'submitResetPasswordForm'])->name('reset.password.post');

	
Route::group(['middleware'=>['guest']],function(){

	Route::get('/', function()
	{
	//return view('auth.login');
	return view('index');
	 });

});

Auth::routes(['verify' => true]);

Route::group(
	[
		'prefix' => LaravelLocalization::setLocale(),
		'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath', 'auth' ]
	], function()
	{ 
	
		Route::get('/dashboard', 'HomeController@index')->name('dashboard');
        //===========================roles============================
		Route::resource('roles','RoleController');
		//==============================users============================
		Route::resource('users', 'UserController');
		Route::get('logout','UserController@userLogout')->name('userLogout');
		Route::get('/changePassword','UserController@showChangePasswordForm')->name('changePassword');
		Route::post('/changePassword','UserController@changePassword')->name('changePassword');
		Route::get('studentexport','UserController@export')->name('studentexport');
		Route::get('studentimport','UserController@studentimport')->name('studentimport');
		Route::post('studentfileupload','UserController@studentfileupload')->name('studentfileupload');
		Route::get('userupdatev','UserController@userupdatev')->name('userupdatev');
		//==============================attachment============================ 
		// Route::post('Upload_attachment', 'UserController@Upload_attachment')->name('Upload_attachment');
        // Route::get('Download_attachment/{user_id}/{filename}', 'UserController@Download_attachment')->name('Download_attachment');
        // Route::post('Delete_attachment', 'UserController@Delete_attachment')->name('Delete_attachment');

		 //===========================codes============================ 
		 Route::resource('codes','CodeController');
		 //===========================categories============================ 
		 Route::resource('categories','CategoryController');
		 //===========================items============================ 
		 Route::resource('labs','LabController');
		  //===========================payments============================
		  Route::resource('payments','PaymentController');
		  Route::get('/getcodes/{id}','PaymentController@getcodes')->name('getcodes');
		  //===========================Reports============================ 
		  Route::resource('reports','ReportsController');
		  Route::get('getcodesid', 'ReportsController@getcodesid');
		  Route::post('getcodesReport', 'ReportsController@getcodesReport');
		  //Route::get('/showCode/{id}', 'ReportsController@showCode');

	});