<?php

//use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| 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!
|
*/

use App\Helpers\ImageHelper;
use App\Helpers\ZoomHelper;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Route;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;

//Route::get('language/{id}/{slug?}', 'LanguageController@details');
/**
 * Localization Group
 */

Route::group(['prefix' => LaravelLocalization::setLocale()], function(){

    Route::get('/test', function (){

        $phone = '0581520713';
        dd(explode('0', $phone, 2));
//        \Illuminate\Support\Facades\Artisan::call('config:clear');
//        \Illuminate\Support\Facades\Artisan::call('cache:clear');
        $sms = \App\Helpers\Sms::send('581524713', 'Hello from test sms');

        dd($sms);
        $text = md5(str_random(16));
        dd($text);

        $file = ["/uploads/images/cases_files/1652621779_D54iCoAk1a7n9Yklk5UA.png","/uploads/images/cases_files/1652621780_LkZ5kJXk0JikZTcNPh0E.png"];
        $files = array_map(function ($value){
            return ImageHelper::getFullPath($value);
        }, $file);

        dd($files);
        $text = 'إسم الملف';
        $query = \App\CaseUpdate::where('file_name', 'LIKE', "%$text%")->get();

        dd($query);

        $date = Carbon::now()->format('Y-m-d');

        $dataRet = ZoomHelper::CreateZoomMeeting('UrgentConsulting', $date, intval(10));
        dd($dataRet);
    });

    Route::group(['namespace' => 'Web','middleware' => [ 'checkWebSiteEnabled', 'WebsiteVisitorCount'] ], function () {
        Route::get('/', 'HomeController@index')->name('home');

        Route::get('/login', 'UserController@login')->name('user.login');
        Route::get('/register', 'UserController@register')->name('user.register');
        Route::post('/reg-and-login', 'UserController@doRegAndLogin')->name('user.doRegAndLogin');
        Route::get('/type-verify-code', 'UserController@typeVerifyCode')->name('user.typeVerifyCode');
        Route::post('/code-verification', 'UserController@verifyCode')->name('user.verifyCode');
        Route::get('/resendCode', 'UserController@resendCode')->name('user.resendCode');

        Route::get('/complete-register', 'UserController@completeRegister')->name('user.completeRegister');
        Route::post('/complete-register', 'UserController@doCompleteRegister')->name('user.doCompleteRegister');


        Route::group(['prefix' => 'news'], function (){
            Route::get('/', 'NewsController@index')->name('news.index');
            Route::get('/{news}/{slug?}', 'NewsController@show')->name('news.show');
        });

        Route::group(['prefix' => 'contact-us'], function (){
            Route::get('/', 'VisitorMessageController@index')->name('contactUs');
            Route::post('/', 'VisitorMessageController@store')->name('send_contact_us');
        });


        Route::get('faq', 'FaqController@index')->name('faq.index');
        Route::get('partner', 'PartnerController@index')->name('partner.index');
        Route::get('about-us', 'AboutUsController@index')->name('aboutUs');

        Route::post('/newsletter', 'NewsletterController@store')->name('newsletter');
        Route::get('/privacy-policy', 'HomeController@privacyPolicy')->name('privacyPolicy');
        Route::get('/terms-conditions', 'HomeController@termsConditions')->name('termsConditions');


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


            /**********************************************************************************
             * IN AUTH BEFORE START
             **********************************************************************************/


            Route::group(['prefix' => 'consulting'], function (){
                Route::get('/booking/{consultingType?}', 'ConsultingController@consultingBookingForm')->name('consulting.consultingBookingForm');
                Route::get('/get-date-time', 'ConsultingController@getConsultingDateAndTime')->name('consulting.getConsultingDateAndTime');

            });

            // Documentation block routes
            Route::group(['prefix' => 'documentation'], function (){
                Route::get('/', 'DocumentationController@index')->name('documentation.index');
                Route::get('/get-data-time', 'DocumentationController@getDocumentationDateAndTime')->name('documentation.getDocumentationDateAndTime');
            });

            // Cases block routes
            Route::group(['prefix' => 'cases'], function (){
                Route::get('/', 'CaseController@index')->name('cases.index');

            });


            // Companies block routes
            Route::group(['prefix' => 'companies'], function (){
                Route::get('/requests', 'CompanyController@index')->name('company.index');

            });

            // Others block routes
            Route::group(['prefix' => 'others'], function (){
                Route::get('/requests', 'OtherController@index')->name('other.index');

            });


            Route::get('/check-coupon', 'CouponController@checkCoupon')->name('checkCoupon');

            /**********************************************************************************
             * IN AUTH BEFORE END
             **********************************************************************************/

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

                Route::group(['prefix' => 'profile'], function (){
                    Route::get('/', 'UserController@profile')->name('user.profile');
                    Route::get('/edit', 'UserController@profileForm')->name('user.profileForm');
                    Route::post('/update/{user}', 'UserController@updateProfile')->name('user.updateProfile');

                });

                Route::group(['prefix' => 'phone'], function (){
                    Route::get('/edit', 'UserController@phoneForm')->name('user.phoneForm');
                    Route::post('/update/{user}', 'UserController@updatePhone')->name('user.updatePhone');
                });

                Route::group(['prefix' => 'my-consulting'], function (){
                    Route::get('/', 'UserController@myConsulting')->name('user.myConsulting');
                    Route::get('/details/{consultingRequest}', 'UserController@myConsultingDetails')->name('user.myConsultingDetails');
                    Route::post('/evaluate/{consultingRequest}', 'UserController@consultingEvaluate')->name('user.consultingEvaluate');
                    Route::post('/complaint/{consultingRequest}', 'UserController@consultingComplaint')->name('user.consultingComplaint');

                });

                Route::group(['prefix' => 'my-documentations'], function (){
                    Route::get('/', 'UserController@myDocumentations')->name('user.myDocumentations');
                    Route::get('/details/{documentationRequest}', 'UserController@myDocumentationDetails')->name('user.myDocumentationDetails');
                });

                Route::group(['prefix' => 'my-companies'], function (){
                    Route::get('/requests', 'UserController@myCompanyRequests')->name('user.companyRequests');
                });

                Route::group(['prefix' => 'my-others'], function (){
                    Route::get('/requests', 'UserController@myOtherRequests')->name('user.otherRequests');
                });


                Route::get('case-requests-updates', 'UserController@caseRequestsAndUpdates')->name('user.caseRequestsAndUpdates');
//                Route::get('case-updates', 'UserController@caseUpdates')->name('user.caseUpdates');
                Route::get('notifications', 'UserController@notifications')->name('user.notifications');
                Route::get('make-notification-as-read/{notification?}', 'UserController@makeNotificationAsRead')->name('user.makeNotificationAsRead');


                Route::any('/logout', 'UserController@logout')->name('user.logout');

                // Consulting block routes
//                Route::get('/consulting', 'ConsultingController@index')->name('consulting.index');
                Route::group(['prefix' => 'consulting'], function (){
//                    Route::get('/booking/{consultingType?}', 'ConsultingController@consultingBookingForm')->name('consulting.consultingBookingForm');
                    Route::post('/booking/{consultingType?}', 'ConsultingController@consultingRequest')->name('consulting.consultingRequest');
//                    Route::get('/get-date-time', 'ConsultingController@getConsultingDateAndTime')->name('consulting.getConsultingDateAndTime');

                });

                // Documentation block routes
                Route::group(['prefix' => 'documentation'], function (){
//                    Route::get('/', 'DocumentationController@index')->name('documentation.index');
                    Route::post('/booking', 'DocumentationController@documentationRequest')->name('documentation.documentationRequest');
//                    Route::get('/get-data-time', 'DocumentationController@getDocumentationDateAndTime')->name('documentation.getDocumentationDateAndTime');
                });

                // Cases block routes
                Route::group(['prefix' => 'cases'], function (){
//                    Route::get('/', 'CaseController@index')->name('cases.index');
                    Route::post('/request', 'CaseController@caseRequest')->name('cases.caseRequest');
                    Route::post('/request/{caseRequestId}', 'CaseController@updateCaseRequest')->name('cases.updateCaseRequest');

                });


                // Companies block routes
                Route::group(['prefix' => 'companies'], function (){
//                    Route::get('/requests', 'CompanyController@index')->name('company.index');
                    Route::post('/request', 'CompanyController@request')->name('company.request');

                });

                // Others block routes
                Route::group(['prefix' => 'others'], function (){
//                    Route::get('/requests', 'OtherController@index')->name('other.index');
                    Route::post('/request', 'OtherController@request')->name('other.request');

                });

                // Training block routes
//                Route::group(['prefix' => 'trainings'], function (){
//                    Route::get('/', 'TrainingController@index')->name('trainings.index');
//                    Route::post('/request', 'TrainingController@trainingRequest')->name('trainings.trainingRequest');
//
//                });

//                Route::get('/check-coupon', 'CouponController@checkCoupon')->name('checkCoupon');
                Route::get('callback', 'MyFatoorah@callback')->name('callback');


            });
        });
    });


    /**
     * this route for the central admin and central super admin to enable them to use this website
     */
    Route::get('/login/{admin_token}', 'Auth\LoginController@superAdminLogin')->name('superAdminLogin');

    /**
     * Authentication routes , and Authentication user routs
     */
//	Auth::routes();

    /**
     * Admin Routes
     */
    Route::group([ 'prefix'=> 'admin', 'namespace' => 'Admin'], function () {

        Route::get('/login', 'LoginController@index');
        Route::post('/login', 'LoginController@authenticate')->name('admin_login');

        Route::group([ 'middleware' => ['admin_auth']], function () {
            Route::get('/', 'DashboardController@index')->name('dashboard');

            Route::post('/logout', 'LoginController@logout')->name('admin_logout');

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


                Route::put('/consultingTopics/restore/{id}', 'ConsultingTopicController@restore')->name('consultingTopics.restore');
                Route::put('/consultingTopics/restore', 'ConsultingTopicController@restoreAll')->name('consultingTopics.restoreAll');
                Route::delete('/consultingTopics', 'ConsultingTopicController@destroyAll')->name('consultingTopics.destroyAll');
                Route::get('/consultingTopics/grid', 'ConsultingTopicController@grid')->name('consultingTopics.grid');
                Route::resource('/consultingTopics', 'ConsultingTopicController');

                Route::put('/consultings/restore/{id}', 'ConsultingController@restore')->name('consultings.restore');
                Route::put('/consultings/restore', 'ConsultingController@restoreAll')->name('consultings.restoreAll');
                Route::delete('/consultings', 'ConsultingController@destroyAll')->name('consultings.destroyAll');
                Route::get('/consultings/grid', 'ConsultingController@grid')->name('consultings.grid');
                Route::get('/consultings/activeConsulting/{consulting}', 'ConsultingController@activeConsulting')->name('consultings.activeConsulting');
//                Route::get('/consultings/details', 'ConsultingController@details')->name('consultings.details');
//                Route::post('/consultings/details/{consultingDetail}', 'ConsultingController@updateDetails')->name('consultings.updateDetails');
                Route::resource('/consultings', 'ConsultingController');

//                Route::put('/activeConsultings/restore/{id}', 'ActiveConsultingController@restore')->name('activeConsultings.restore');
//                Route::put('/activeConsultings/restore', 'ActiveConsultingController@restoreAll')->name('activeConsultings.restoreAll');
//                Route::delete('/activeConsultings', 'ActiveConsultingController@destroyAll')->name('activeConsultings.destroyAll');
                Route::get('/activeConsultings/grid', 'ActiveConsultingController@grid')->name('activeConsultings.grid');
                Route::get('/activeConsultings/consultationStatus/{activeConsulting}', 'ActiveConsultingController@consultationStatus')->name('activeConsultings.consultationStatus');
                Route::resource('/activeConsultings', 'ActiveConsultingController')->only(['index', 'edit', 'update']);

//                Route::put('/finishedConsultings/restore/{id}', 'FinishedConsultingController@restore')->name('finishedConsultings.restore');
//                Route::put('/finishedConsultings/restore', 'FinishedConsultingController@restoreAll')->name('finishedConsultings.restoreAll');
//                Route::delete('/finishedConsultings', 'FinishedConsultingController@destroyAll')->name('finishedConsultings.destroyAll');
                Route::get('/finishedConsultings/grid', 'FinishedConsultingController@grid')->name('finishedConsultings.grid');
                Route::resource('/finishedConsultings', 'FinishedConsultingController')->only(['index', 'edit', 'update']);


                Route::put('/documentationTypes/restore/{id}', 'DocumentationTypeController@restore')->name('documentationTypes.restore');
                Route::put('/documentationTypes/restore', 'DocumentationTypeController@restoreAll')->name('documentationTypes.restoreAll');
                Route::delete('/documentationTypes', 'DocumentationTypeController@destroyAll')->name('documentationTypes.destroyAll');
                Route::get('/documentationTypes/grid', 'DocumentationTypeController@grid')->name('documentationTypes.grid');
                Route::resource('/documentationTypes', 'DocumentationTypeController');

                Route::put('/documentations/restore/{id}', 'DocumentationController@restore')->name('documentations.restore');
                Route::put('/documentations/restore', 'DocumentationController@restoreAll')->name('documentations.restoreAll');
                Route::delete('/documentations', 'DocumentationController@destroyAll')->name('documentations.destroyAll');
                Route::get('/documentations/grid', 'DocumentationController@grid')->name('documentations.grid');
                Route::get('/documentations/activeDocumentation/{documentation}', 'DocumentationController@activeDocumentation')->name('documentations.activeDocumentation');
                Route::resource('/documentations', 'DocumentationController');

                Route::put('/documentationRequests/restore/{id}', 'DocumentationRequestController@restore')->name('documentationRequests.restore');
                Route::put('/documentationRequests/restore', 'DocumentationRequestController@restoreAll')->name('documentationRequests.restoreAll');
                Route::delete('/documentationRequests', 'DocumentationRequestController@destroyAll')->name('documentationRequests.destroyAll');
                Route::get('/documentationRequests/grid', 'DocumentationRequestController@grid')->name('documentationRequests.grid');
                Route::get('/documentationRequests/changeStatus/{documentationRequest}', 'DocumentationRequestController@changeStatus')->name('documentationRequests.changeStatus');
                Route::resource('/documentationRequests', 'DocumentationRequestController');

                Route::put('/caseTopics/restore/{id}', 'CaseTopicController@restore')->name('caseTopics.restore');
                Route::put('/caseTopics/restore', 'CaseTopicController@restoreAll')->name('caseTopics.restoreAll');
                Route::delete('/caseTopics', 'CaseTopicController@destroyAll')->name('caseTopics.destroyAll');
                Route::get('/caseTopics/grid', 'CaseTopicController@grid')->name('caseTopics.grid');
                Route::resource('/caseTopics', 'CaseTopicController');

                Route::put('/caseRequests/restore/{id}', 'CaseRequestController@restore')->name('caseRequests.restore');
                Route::put('/caseRequests/restore', 'CaseRequestController@restoreAll')->name('caseRequests.restoreAll');
                Route::delete('/caseRequests', 'CaseRequestController@destroyAll')->name('caseRequests.destroyAll');
                Route::get('/caseRequests/grid', 'CaseRequestController@grid')->name('caseRequests.grid');
                Route::resource('/caseRequests', 'CaseRequestController')->only(['index', 'edit', 'update', 'destroy']);

                Route::put('/caseUpdates/restore/{id}', 'CaseUpdateController@restore')->name('caseUpdates.restore');
                Route::put('/caseUpdates/restore', 'CaseUpdateController@restoreAll')->name('caseUpdates.restoreAll');
                Route::delete('/caseUpdates', 'CaseUpdateController@destroyAll')->name('caseUpdates.destroyAll');
                Route::get('/caseUpdates/grid', 'CaseUpdateController@grid')->name('caseUpdates.grid');
                Route::get('/caseUpdates/files/{user}', 'CaseUpdateController@files')->name('caseUpdates.files');
                Route::get('/caseUpdates/files/grid/{user}', 'CaseUpdateController@filesGrid')->name('caseUpdates.filesGrid');
                Route::resource('/caseUpdates', 'CaseUpdateController')->only(['index', 'destroy', 'edit', 'update']);

                Route::put('/companyRequestTopics/restore/{id}', 'CompanyRequestTopicController@restore')->name('companyRequestTopics.restore');
                Route::put('/companyRequestTopics/restore', 'CompanyRequestTopicController@restoreAll')->name('companyRequestTopics.restoreAll');
                Route::delete('/companyRequestTopics', 'CompanyRequestTopicController@destroyAll')->name('companyRequestTopics.destroyAll');
                Route::get('/companyRequestTopics/grid', 'CompanyRequestTopicController@grid')->name('companyRequestTopics.grid');
                Route::resource('/companyRequestTopics', 'CompanyRequestTopicController');

                Route::put('/companyRequests/restore/{id}', 'CompanyRequestController@restore')->name('companyRequests.restore');
                Route::put('/companyRequests/restore', 'CompanyRequestController@restoreAll')->name('companyRequests.restoreAll');
                Route::delete('/companyRequests', 'CompanyRequestController@destroyAll')->name('companyRequests.destroyAll');
                Route::get('/companyRequests/grid', 'CompanyRequestController@grid')->name('companyRequests.grid');
                Route::resource('/companyRequests', 'CompanyRequestController')->only(['index', 'edit', 'destroy']);

                Route::put('/otherRequestTopics/restore/{id}', 'OtherRequestTopicController@restore')->name('otherRequestTopics.restore');
                Route::put('/otherRequestTopics/restore', 'OtherRequestTopicController@restoreAll')->name('otherRequestTopics.restoreAll');
                Route::delete('/otherRequestTopics', 'OtherRequestTopicController@destroyAll')->name('otherRequestTopics.destroyAll');
                Route::get('/otherRequestTopics/grid', 'OtherRequestTopicController@grid')->name('otherRequestTopics.grid');
                Route::resource('/otherRequestTopics', 'OtherRequestTopicController');

                Route::put('/otherRequests/restore/{id}', 'OtherRequestController@restore')->name('otherRequests.restore');
                Route::put('/otherRequests/restore', 'OtherRequestController@restoreAll')->name('otherRequests.restoreAll');
                Route::delete('/otherRequests', 'OtherRequestController@destroyAll')->name('otherRequests.destroyAll');
                Route::get('/otherRequests/grid', 'OtherRequestController@grid')->name('otherRequests.grid');
                Route::resource('/otherRequests', 'OtherRequestController')->only(['index', 'edit', 'destroy']);

//                Route::put('/purposeTrainings/restore/{id}', 'PurposeTrainingController@restore')->name('purposeTrainings.restore');
//                Route::put('/purposeTrainings/restore', 'PurposeTrainingController@restoreAll')->name('purposeTrainings.restoreAll');
//                Route::delete('/purposeTrainings', 'PurposeTrainingController@destroyAll')->name('purposeTrainings.destroyAll');
//                Route::get('/purposeTrainings/grid', 'PurposeTrainingController@grid')->name('purposeTrainings.grid');
//                Route::resource('/purposeTrainings', 'PurposeTrainingController');

//                Route::put('/trainingRequests/restore/{id}', 'TrainingRequestController@restore')->name('trainingRequests.restore');
//                Route::put('/trainingRequests/restore', 'TrainingRequestController@restoreAll')->name('trainingRequests.restoreAll');
//                Route::delete('/trainingRequests', 'TrainingRequestController@destroyAll')->name('trainingRequests.destroyAll');
//                Route::get('/trainingRequests/grid', 'TrainingRequestController@grid')->name('trainingRequests.grid');
//                Route::resource('/trainingRequests', 'TrainingRequestController')->only(['index', 'edit', 'destroy']);

//                Route::put('/sliders/restore/{id}', 'SliderController@restore')->name('sliders.restore');
//                Route::put('/sliders/restore', 'SliderController@restoreAll')->name('sliders.restoreAll');
//                Route::delete('/sliders', 'SliderController@destroyAll')->name('sliders.destroyAll');
                Route::get('/sliders/grid', 'SliderController@grid')->name('sliders.grid');
                Route::resource('/sliders', 'SliderController')->only(['index', 'edit', 'update']);

                Route::put('/coupons/restore/{id}', 'CouponController@restore')->name('coupons.restore');
                Route::put('/coupons/restore', 'CouponController@restoreAll')->name('coupons.restoreAll');
                Route::delete('/coupons', 'CouponController@destroyAll')->name('coupons.destroyAll');
                Route::get('/coupons/grid', 'CouponController@grid')->name('coupons.grid');
                Route::get('/coupons/activeCoupon/{coupon}', 'CouponController@activeCoupon')->name('coupons.activeCoupon');
                Route::resource('/coupons', 'CouponController');

                Route::put('/marketerCoupons/restore/{id}', 'MarketerCouponController@restore')->name('marketerCoupons.restore');
                Route::put('/marketerCoupons/restore', 'MarketerCouponController@restoreAll')->name('marketerCoupons.restoreAll');
                Route::delete('/marketerCoupons', 'MarketerCouponController@destroyAll')->name('marketerCoupons.destroyAll');
                Route::get('/marketerCoupons/grid', 'MarketerCouponController@grid')->name('marketerCoupons.grid');
                Route::get('/marketerCoupons/activeCoupon/{marketerCoupon}', 'MarketerCouponController@activeCoupon')->name('marketerCoupons.activeCoupon');
                Route::resource('/marketerCoupons', 'MarketerCouponController');

                Route::put('/marketerCommissions/restore/{id}', 'MarketerCommissionController@restore')->name('marketerCommissions.restore');
                Route::put('/marketerCommissions/restore', 'MarketerCommissionController@restoreAll')->name('marketerCommissions.restoreAll');
                Route::delete('/marketerCommissions', 'MarketerCommissionController@destroyAll')->name('marketerCommissions.destroyAll');
                Route::get('/marketerCommissions/grid', 'MarketerCommissionController@grid')->name('marketerCommissions.grid');
                Route::resource('/marketerCommissions', 'MarketerCommissionController');

                Route::put('/consultingEvaluates/restore/{id}', 'ConsultingEvaluateController@restore')->name('consultingEvaluates.restore');
                Route::put('/consultingEvaluates/restore', 'ConsultingEvaluateController@restoreAll')->name('consultingEvaluates.restoreAll');
                Route::delete('/consultingEvaluates', 'ConsultingEvaluateController@destroyAll')->name('consultingEvaluates.destroyAll');
                Route::get('/consultingEvaluates/grid', 'ConsultingEvaluateController@grid')->name('consultingEvaluates.grid');
//                Route::get('/consultingEvaluates/activeEvaluate/{consultingEvaluate}', 'ConsultingEvaluateController@activeEvaluate')->name('consultingEvaluates.activeEvaluate');
                Route::resource('/consultingEvaluates', 'ConsultingEvaluateController')->only(['index', 'edit', 'destroy']);

                Route::put('/consultingComplaints/restore/{id}', 'ConsultingComplaintController@restore')->name('consultingComplaints.restore');
                Route::put('/consultingComplaints/restore', 'ConsultingComplaintController@restoreAll')->name('consultingComplaints.restoreAll');
                Route::delete('/consultingComplaints', 'ConsultingComplaintController@destroyAll')->name('consultingComplaints.destroyAll');
                Route::get('/consultingComplaints/grid', 'ConsultingComplaintController@grid')->name('consultingComplaints.grid');
                Route::resource('/consultingComplaints', 'ConsultingComplaintController')->only(['index', 'edit', 'destroy']);

                Route::put('/articles/restore/{id}', 'ArticleController@restore')->name('articles.restore');
                Route::put('/articles/restore', 'ArticleController@restoreAll')->name('articles.restoreAll');
                Route::delete('/articles', 'ArticleController@destroyAll')->name('articles.destroyAll');
                Route::get('/articles/grid', 'ArticleController@grid')->name('articles.grid');
                Route::resource('/articles', 'ArticleController');

                Route::put('/cities/restore/{id}', 'CityController@restore')->name('cities.restore');
                Route::put('/cities/restore', 'CityController@restoreAll')->name('cities.restoreAll');
                Route::delete('/cities', 'CityController@destroyAll')->name('cities.destroyAll');
                Route::get('/cities/grid', 'CityController@grid')->name('cities.grid');
                Route::resource('/cities', 'CityController');

                Route::put('/faqs/restore/{id}', 'FaqController@restore')->name('faqs.restore');
                Route::put('/faqs/restore', 'FaqController@restoreAll')->name('faqs.restoreAll');
                Route::delete('/faqs', 'FaqController@destroyAll')->name('faqs.destroyAll');
                Route::get('/faqs/grid', 'FaqController@grid')->name('faqs.grid');
                Route::resource('/faqs', 'FaqController');

                Route::put('/members/restore/{id}', 'MemberController@restore')->name('members.restore');
                Route::put('/members/restore', 'MemberController@restoreAll')->name('members.restoreAll');
                Route::delete('/members', 'MemberController@destroyAll')->name('members.destroyAll');
                Route::get('/members/grid', 'MemberController@grid')->name('members.grid');
                Route::get('/members/activeMember/{member}', 'MemberController@activeMember')->name('members.activeMember');
                Route::get('/members/getCityAndSector', 'MemberController@getCityAndSector')->name('members.getCityAndSector');
                Route::resource('/members', 'MemberController');

                Route::put('/usersNotifications/restore/{id}', 'UsersNotificationController@restore')->name('usersNotifications.restore');
                Route::put('/usersNotifications/restore', 'UsersNotificationController@restoreAll')->name('usersNotifications.restoreAll');
                Route::delete('/usersNotifications', 'UsersNotificationController@destroyAll')->name('usersNotifications.destroyAll');
                Route::get('/usersNotifications/grid', 'UsersNotificationController@grid')->name('usersNotifications.grid');
                Route::get('/usersNotifications/getUsers', 'UsersNotificationController@getUsers')->name('usersNotifications.getUsers');
                Route::resource('/usersNotifications', 'UsersNotificationController');

                Route::put('/partners/restore/{id}', 'PartnerController@restore')->name('partners.restore');
                Route::put('/partners/restore', 'PartnerController@restoreAll')->name('partners.restoreAll');
                Route::delete('/partners', 'PartnerController@destroyAll')->name('partners.destroyAll');
                Route::get('/partners/grid', 'PartnerController@grid')->name('partners.grid');
                Route::resource('/partners', 'PartnerController');

                Route::get('/policies/grid', 'PolicyController@grid')->name('policies.grid');
                Route::resource('/policies', 'PolicyController')->only(['index','edit', 'update']);

                Route::get('/abouts/grid', 'AboutController@grid')->name('abouts.grid');
                Route::resource('/abouts', 'AboutController')->only(['index','edit', 'update']);

                Route::get('/homeInfos/grid', 'HomeInfoController@grid')->name('homeInfos.grid');
                Route::resource('/homeInfos', 'HomeInfoController')->only(['index', 'edit', 'update']);

//                Route::put('/services/restore/{id}', 'ServiceController@restore')->name('services.restore');
//                Route::put('/services/restore', 'ServiceController@restoreAll')->name('services.restoreAll');
//                Route::delete('/services', 'ServiceController@destroyAll')->name('services.destroyAll');
                Route::get('/services/grid', 'ServiceController@grid')->name('services.grid');
                Route::resource('/services', 'ServiceController')->only(['index', 'edit', 'update']);

                Route::put('/newsletters/restore/{id}', 'NewsletterController@restore')->name('newsletters.restore');
                Route::put('/newsletters/restore', 'NewsletterController@restoreAll')->name('newsletters.restoreAll');
                Route::delete('/newsletters', 'NewsletterController@destroyAll')->name('newsletters.destroyAll');
                Route::get('/newsletters/grid', 'NewsletterController@grid')->name('newsletters.grid');
                Route::get('/newsletters/mailsList', 'NewsletterController@mailsList')->name('newsletters.mailsList');
                Route::get('/newsletters/mailsListGrid', 'NewsletterController@mailsListGrid')->name('newsletters.mailsListGrid');
                Route::get('/newsletters/mailsListMore/{id}', 'NewsletterController@mailsListMore')->name('newsletters.mailsListMore');
                Route::resource('/newsletters', 'NewsletterController');

                Route::put('/visitorMessages/restore/{id}', 'VisitorMessageController@restore')->name('visitorMessages.restore');
                Route::put('/visitorMessages/restore', 'VisitorMessageController@restoreAll')->name('visitorMessages.restoreAll');
                Route::delete('/visitorMessages', 'VisitorMessageController@destroyAll')->name('visitorMessages.destroyAll');
                Route::get('/visitorMessages/grid', 'VisitorMessageController@grid')->name('visitorMessages.grid');
                Route::resource('/visitorMessages', 'VisitorMessageController');

                Route::put('/users/restore/{id}', 'UserController@restore')->name('users.restore');
                Route::put('/users/restore', 'UserController@restoreAll')->name('users.restoreAll');
                Route::delete('/users', 'UserController@destroyAll')->name('users.destroyAll');
                Route::get('/users/grid', 'UserController@grid')->name('users.grid');
                Route::resource('/users', 'UserController');

//                Route::get('/settings', 'DashboardController@index')->name('admin_settings');
                Route::get('/settings', 'SettingController@index')->name('settings.index');
                Route::post('/settings', 'SettingController@store')->name('settings.store');
                Route::post('/modules-settings', 'SettingController@modules')->name('settings.modules');


            });  // End Role Routes


            Route::resource('/languages', 'LanguageController');
            // Route::post('/languages/{id}', 'LanguageController@update')->name('languages');

        }); // End Authenticated Admin routes
    }); // End Admin Routes

});
