<?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('welcome'); });
Route::post('/updateservice', 'Members@updateservice');
Route::get('/memberlogout', 'Auth\MemberLoginController@memberlogout')->name('member.logout');
Route::get('/listservices', 'ListServices@index')->name('listservices');
Route::get('/about', function () { return view('about');});
Route::get('/contactus', function () { return view('contactus');});
Route::get('/registration', function () { return view('registration');});
Route::get('/ajaxregister', 'Users@ajaxregister')->name('ajaxregister');
//Route::get('/login', 'Auth\MemberLoginController@showLoginForm')->name('member.login');
Route::get('login', 'Auth\MemberLoginController@showLoginForm')->name('login');
Route::post('/login', 'Auth\MemberLoginController@login')->name('member.login.submit');
Route::get('/myaccount', 'Members@myaccount');
Route::get('/viewprofile', 'Members@viewprofile');
Route::get('/updateprofile', 'Members@updateprofile');


// Route::get('/myaccount', function () { return view('myaccount');});
//Route::get('/listservices', function () { return view('listservices');});
// Route::get('/login', function () { return view('login');});
// Route::get('/userlogin', 'Users@userlogin')->name('userlogin');
// Route::get('/registration', 'Users@registration')->name('registration');

// user_services
Route::get('admin/user_services', 'Admin\UserServicesController@index')->name('admin.user_services');
Route::get('admin/user_services/create', 'Admin\UserServicesController@createForm')->name('admin.user_services.create');
Route::post('admin/user_services/create', 'Admin\UserServicesController@create');
Route::get('admin/user_services/read/{user_services}', 'Admin\UserServicesController@read')->name('admin.user_services.read');
Route::get('admin/user_services/update/{user_services}', 'Admin\UserServicesController@updateForm')->name('admin.user_services.update');
Route::patch('admin/user_services/update/{user_services}', 'Admin\UserServicesController@update');
Route::delete('admin/user_services/delete/{user_services}', 'Admin\UserServicesController@delete')->name('admin.user_services.delete');