<?php

//Route::get('/', 'Admin\AuthenticationController@login');
Route::post('/login/validate', 'Auth\LoginController@validate_api');
Route::get('admin/auth-login', 'Admin\AuthenticationController@login');
Route::get('admin/auth-register', 'Admin\AuthenticationController@register');
Route::get('admin/auth-forgot-password', 'Admin\AuthenticationController@forgot_password');
Route::get('admin/auth-reset-password', 'Admin\AuthenticationController@reset_password');
Route::get('admin/auth-lock-screen', 'Admin\AuthenticationController@lock_screen');

Route::get('admin/login', 'Admin\AuthenticationController@login');
Route::post('check-login', 'Admin\AuthenticationController@checklogin');

//Route::get('/', 'Admin\DashboardController@index');
//Route::get('dashboard', 'Admin\DashboardController@index');
Route::group(
        ['prefix' => 'admin'], function() {
    $admin = "Admin\\";

    Route::get('/', 'Admin\DashboardController@index');
    Route::get('dashboard', 'Admin\DashboardController@index');
    Route::get('logout', $admin . 'LogoutController@logout');

    Route::post('recover_password', $admin . 'ResetPasswordController@recover_password');
    Route::post('reset', $admin . 'ResetPasswordController@change_password');

    Route::get('get_statistics', $admin . 'DashboardController@statistics');
    Route::get('user-profile-page', $admin . 'UserController@user_profile_page');
    Route::post('profile-update', $admin . 'UserController@update_profile');

    Route::get('update-user-password-page', $admin . 'UserController@update_user_password_page');
    Route::post('update-password', $admin . 'UserController@update_user_password');

    Route::resources(['administrators' => $admin . 'AdministratorsController']);
    Route::post('administrators/save', $admin . 'AdministratorsController@save');
    Route::get('administrators/edit/{id}', $admin . 'AdministratorsController@edit');
    Route::post('administrators/update/{id}', $admin . 'AdministratorsController@update');
    Route::get('administrators/show/{id}', $admin . 'AdministratorsController@show');
    Route::get('administrators/delete/{id}', $admin . 'AdministratorsController@delete');

    Route::resources(['settings' => $admin . 'SettingsController']);
    Route::post('settings/update', $admin . 'SettingsController@update');
    Route::get('manager', $admin . 'FileManagerController@index');

    Route::resources(['countries' => $admin . 'CountriesController']);
    Route::post('countries/save', $admin . 'CountriesController@save');
    Route::get('countries/edit/{id}', $admin . 'CountriesController@edit');
    Route::post('countries/update/{id}', $admin . 'CountriesController@update');
    Route::get('countries/show/{id}', $admin . 'CountriesController@show');
    Route::get('countries/delete/{id}', $admin . 'CountriesController@delete');

    Route::resources(['navigations' => $admin . 'NavigationsController']);
    Route::post('navigations/save', $admin . 'NavigationsController@save');
    Route::get('navigations/edit/{id}', $admin . 'NavigationsController@edit');
    Route::post('navigations/update/{id}', $admin . 'NavigationsController@update');
    Route::get('navigations/show/{id}', $admin . 'NavigationsController@show');
    Route::get('navigations/delete/{id}', $admin . 'NavigationsController@delete');

    Route::resources(['pages' => $admin . 'CmsPagesController']);
    Route::post('pages/save', $admin . 'CmsPagesController@save');
    Route::get('pages/edit/{id}', $admin . 'CmsPagesController@edit');
    Route::post('pages/update/{id}', $admin . 'CmsPagesController@update');
    Route::get('pages/show/{id}', $admin . 'CmsPagesController@show');
    Route::get('pages/delete/{id}', $admin . 'CmsPagesController@delete');

    Route::resources(['banners' => $admin . 'BannersController']);
    Route::post('banners/save', $admin . 'BannersController@save');
    Route::get('banners/edit/{id}', $admin . 'BannersController@edit');
    Route::post('banners/update/{id}', $admin . 'BannersController@update');
    Route::get('banners/show/{id}', $admin . 'BannersController@show');
    Route::get('banners/delete/{id}', $admin . 'BannersController@delete');
    Route::get('banners/remove/{id}', $admin . 'BannersController@RemoveImage');

    Route::resources(['widgets' => $admin . 'WidgetsController']);
    Route::post('widgets/save', $admin . 'WidgetsController@save');
    Route::get('widgets/edit/{id}', $admin . 'WidgetsController@edit');
    Route::post('widgets/update/{id}', $admin . 'WidgetsController@update');
    Route::get('widgets/show/{id}', $admin . 'WidgetsController@show');
    Route::get('widgets/delete/{id}', $admin . 'WidgetsController@delete');
    Route::get('widgets/remove/{id}', $admin . 'WidgetsController@RemoveImage');

    Route::resources(['widgetsections' => $admin . 'WidgetSectionController']);
    Route::post('widgetsections/save', $admin . 'WidgetSectionController@save');
    Route::get('widgetsections/edit/{id}', $admin . 'WidgetSectionController@edit');
    Route::post('widgetsections/update/{id}', $admin . 'WidgetSectionController@update');
    Route::get('widgetsections/show/{id}', $admin . 'WidgetSectionController@show');
    Route::get('widgetsections/delete/{id}', $admin . 'WidgetSectionController@delete');

    Route::resources(['blog_categories' => $admin . 'BlogCategoriesController']);
    Route::post('blog_categories/save', $admin . 'BlogCategoriesController@save');
    Route::get('blog_categories/edit/{id}', $admin . 'BlogCategoriesController@edit');
    Route::post('blog_categories/update/{id}', $admin . 'BlogCategoriesController@update');
    Route::get('blog_categories/show/{id}', $admin . 'BlogCategoriesController@show');
    Route::get('blog_categories/delete/{id}', $admin . 'BlogCategoriesController@delete');

    Route::resources(['posts' => $admin . 'PostController']);
    Route::post('posts/save', $admin . 'PostController@save');
    Route::get('posts/edit/{id}', $admin . 'PostController@edit');
    Route::post('posts/update/{id}', $admin . 'PostController@update');
    Route::get('posts/show/{id}', $admin . 'PostController@show');
    Route::get('posts/delete/{id}', $admin . 'PostController@delete');

    Route::resources(['videos' => $admin . 'VideoController']);
    Route::post('videos/save', $admin . 'VideoController@save');
    Route::get('videos/edit/{id}', $admin . 'VideoController@edit');
    Route::post('videos/update/{id}', $admin . 'VideoController@update');
    Route::get('videos/show/{id}', $admin . 'VideoController@show');
    Route::get('videos/delete/{id}', $admin . 'VideoController@delete');

    Route::resources(['press' => $admin . 'PressRelaseConttroller']);
    Route::post('press/save', $admin . 'PressRelaseConttroller@save');
    Route::get('press/edit/{id}', $admin . 'PressRelaseConttroller@edit');
    Route::post('press/update/{id}', $admin . 'PressRelaseConttroller@update');
    Route::get('press/show/{id}', $admin . 'PressRelaseConttroller@show');
    Route::get('press/delete/{id}', $admin . 'PressRelaseConttroller@delete');

    Route::resources(['categories' => $admin . 'CategoriesController']);
    Route::post('categories/save', $admin . 'CategoriesController@save');
    Route::get('categories/edit/{id}', $admin . 'CategoriesController@edit');
    Route::post('categories/update/{id}', $admin . 'CategoriesController@update');
    Route::get('categories/show/{id}', $admin . 'CategoriesController@show');
    Route::get('categories/delete/{id}', $admin . 'CategoriesController@delete');
    Route::post('categories/add', $admin . 'CategoriesController@add');
  
    Route::resources(['teams' => $admin . 'TeamController']);
    Route::post('teams/save', $admin . 'TeamController@save');
    Route::get('teams/edit/{id}', $admin . 'TeamController@edit');
    Route::post('teams/update/{id}', $admin . 'TeamController@update');
    Route::get('teams/show/{id}', $admin . 'TeamController@show');
    Route::get('teams/delete/{id}', $admin . 'TeamController@delete');


    Route::resources(['whats_covered' => $admin . 'FacilitiesController']);
    Route::post('whats_covered/save', $admin . 'FacilitiesController@save');
    Route::get('whats_covered/edit/{id}', $admin . 'FacilitiesController@edit');
    Route::post('whats_covered/update/{id}', $admin . 'FacilitiesController@update');
    Route::get('whats_covered/show/{id}', $admin . 'FacilitiesController@show');
    Route::get('whats_covered/delete/{id}', $admin . 'FacilitiesController@delete');

    Route::resources(['excesses' => $admin . 'ExcessesController']);
    Route::post('excesses/save', $admin . 'ExcessesController@save');
    Route::get('excesses/edit/{id}', $admin . 'ExcessesController@edit');
    Route::post('excesses/update/{id}', $admin . 'ExcessesController@update');
    Route::get('excesses/show/{id}', $admin . 'ExcessesController@show');
    Route::get('excesses/delete/{id}', $admin . 'ExcessesController@delete');


    Route::resources(['packages' => $admin . 'PackagesController']);
    Route::post('packages/save', $admin . 'PackagesController@save');
    Route::get('packages/edit/{id}', $admin . 'PackagesController@edit');
    Route::post('packages/update/{id}', $admin . 'PackagesController@update');
    Route::get('packages/show/{id}', $admin . 'PackagesController@show');
    Route::get('packages/delete/{id}', $admin . 'PackagesController@delete');
    Route::post('packages/savefaqs', $admin . 'PackagesController@savefaqs');



    Route::resources(['faqs' => $admin . 'FAQController']);
    Route::get('faqs', $admin . 'FAQController@index');
    Route::post('faqs/save', $admin . 'FAQController@save');
    Route::get('faqs/edit/{id}', $admin . 'FAQController@edit');
    Route::post('faqs/update/{id}', $admin . 'FAQController@update');
    Route::get('faqs/delete/{id}', $admin . 'FAQController@delete');
    Route::post('faqs/upload', $admin . 'FAQController@upload');
    Route::post('faqs/add', $admin . 'FAQController@add');
    Route::post('faqs/savequestion', $admin . 'FAQController@savequestion');
    Route::get('faqs/gethotelimages/{hotel_id}', $admin . 'FAQController@gethotelimages');
    
    Route::get('media/search', $admin . 'MediaController@searchData');

    Route::post('media/deleteMultiple', $admin . 'MediaController@deleteMultiple');
    Route::post('media/upload', $admin . 'MediaController@upload');
    Route::get('media/get', $admin . 'MediaController@get');
    Route::get('media', $admin . 'MediaController@index');
    Route::get('media/create', $admin . 'MediaController@create');
    Route::post('media/save', $admin . 'MediaController@save');
    Route::get('media/edit/{id}', $admin . 'MediaController@edit');
    Route::post('media/save', $admin . 'MediaController@save');
    Route::post('media/update/{id}', $admin . 'MediaController@update');
    Route::get('media/delete/{id}', $admin . 'MediaController@delete');
    Route::get('media/{id}', $admin . 'MediaController@show');
    
     Route::resources(['enquire' => $admin . 'EnquiryController']);
    Route::get('enquire/show/{id}', $admin . 'EnquiryController@show');
    Route::get('enquire/delete/{id}', $admin . 'EnquiryController@delete');
    
    Route::resources(['customers' => $admin . 'CustomerController']);
    Route::post('customers/save', $admin . 'CustomerController@save');
    Route::get('customers/edit/{id}', $admin . 'CustomerController@edit');
    Route::post('customers/update/{id}', $admin . 'CustomerController@update');
    Route::get('customers/show/{id}', $admin . 'CustomerController@show');
    Route::get('customers/delete/{id}', $admin . 'CustomerController@delete');
    
    Route::resources(['transactions' => $admin . 'TransactionsController']);

    Route::resources(['invoices' => $admin . 'InvoicesController']);
    
    Route::get('transactions/{id}/logs', $admin . 'TransactionsController@logs');
    Route::get('transactions/{id}/logs/{logId}', $admin . 'TransactionsController@singleLog');

    Route::post('transactions/save', $admin . 'TransactionsController@save');
    Route::get('transactions/pdf/{id}', $admin . 'TransactionsController@downloadPdf');
    Route::get('transactions/edit/{id}', $admin . 'TransactionsController@edit');
    Route::post('transactions/update/{id}', $admin . 'TransactionsController@update');
    Route::get('transactions/show/{id}', $admin . 'TransactionsController@show');
    Route::get('transactions/delete/{id}', $admin . 'TransactionsController@delete');
    
    Route::resources(['emailresponders' => $admin .'EmailrespondersController']);
    Route::post('/emailresponders/save', $admin .'EmailrespondersController@save');
    Route::get('/emailresponders/edit/{id}', $admin .'EmailrespondersController@edit');
    Route::post('/emailresponders/update/{id}',$admin . 'EmailrespondersController@update');
    Route::get('/emailresponders/show/{id}', $admin .'EmailrespondersController@show');
    Route::get('/emailresponders/delete/{id}', $admin .'EmailrespondersController@delete');


    // SubscriptionEvents        
    Route::resources(['subscriptionevents' => $admin .'SubscriptionEventsController']);
    
 
});

