<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function(){ return view('home');});

Route::get('/home',function(){ return view('home');});
Route::get('/editprofile','IndexController@editprofile')->middleware('Missing');
Route::get('/changephone','IndexController@changephone')->middleware('Missing');
Route::get('/changepassword','IndexController@changepassword')->middleware('Missing');

Route::get('/welcome',function(){ return view('home');});
Route::get('/login','IndexController@showloginform')->name('login');
Route::post('/update_profile','IndexController@update_profile')->name('update_profile');
Route::get('/update_phone','IndexController@update_phone')->name('update_phone');
Route::get('/update_user_password','IndexController@update_user_password')->name('update_user_password');
Route::post('/update_password','IndexController@update_password')->name('update_password');

Route::get('/sendotp','otpController@send_otp');
Route::get('/checknsend','otpController@checknsend');
Route::get('/checkpassword','IndexController@checkpassword');

Route::get('/register',function(){ return view('register');});
Route::get('/dashboard','IndexController@dashboard')->name('dashboard')->middleware(['Cors','Missing']);
Route::post('/login_user','IndexController@login')->name('login_user');
Route::post('/registeruser','IndexController@registeruser')->name('registeruser');
Route::get('/logout','IndexController@logout')->name('logout');
Route::get('/forgetpassword','IndexController@forgetpassword')->name('forgetpassword');
Route::get('/notifications','IndexController@notifications')->middleware('Missing');
Route::get('/cookie/set','CookieController@setCookie')->name('cookieset');
Route::get('/cookie/get','CookieController@getCookie')->name('cookieget');
Route::get('/islogin/{token}','InterfaceController@islogin_api');

Route::get('/clear', function () {
    Artisan::call('cache:clear');
     Artisan::call('config:clear');
     Artisan::call('route:clear');
     Artisan::call('view:clear');
    return "Done";
});

