<?php
Route::get('/test', function() {
        $sale = Salesforce::escribeLayout('Account');
        print_r($sale);die;

});


Route::group(['middleware' => ['guest']], function () {
Route::get('/','auth\AuthController@Index');
Route::post('register','auth\AuthController@Register');
Route::post('contact','auth\AuthController@Contact');
Route::post('reset','auth\AuthController@Reset');
});
// Route::get('/news','front_end\FrontEndController@newsIndex');
// Route::get('/shop','front_end\FrontEndController@shopIndex');
// Route::get('/contact','front_end\FrontEndController@contactIndex');
Route::auth();
Route::controller('auth','auth\AuthController');
Route::group(['middleware' => 'validateBackHistory'], function (){
Route::group(['middleware' => ['auth']], function () {
Route::group(['prefix' => 'admin'], function () {
Route::post('profile_image', 'admin\UserController@profile_image');
/**
* Activity Log
 */
Route::resource('activitylogs','admin\ActivityLogController');
Route::post('activitylogs/export/excel','admin\ActivityLogController@export_excel');
Route::post('activitylogs/search','admin\ActivityLogController@search');
/**
* image route
*/
Route::post('/uploadimage','admin\UploadController@uploadimage');
Route::post('{id}/uploadimage','admin\UploadController@deleteimage');
Route::post('{id}/deletemultiimage','admin\UploadController@deleteMultiUpload');
/* language route*/
Route::get('language','admin\LangController@change');
/**
*  CRUD builder*/
Route::post('modules/new','admin\CrudBuilderController@generateModule');
Route::post('modules/updatesecondlevel','admin\CrudBuilderController@updateSecondLevel');
Route::post('modules/disable','admin\CrudBuilderController@disableModule');
Route::post('modules/modulerollback','admin\CrudBuilderController@migrateRollback');
Route::get('modulesbuilder','admin\CrudBuilderController@view');
Route::resource('modules','admin\CrudBuilderController');
/**
* relation builder*/
Route::post('relation/modulerollback','admin\CrudBuilderController@migrateRollback');
Route::get('relation/showcolumn/{tablename}','admin\RelationBuilderController@showColumn');
Route::get('relation/getrelation','admin\RelationBuilderController@getRelation');
Route::resource('relation','admin\RelationBuilderController');
/**
* import excel csv Route */
Route::post('news/import_excel_csv','admin\ImportController@importCSVEXCEl');
Route::post('news/import_excel_csv_database','admin\ImportController@importCSVEXCElDatabase');
Route::post('news/{id}/delete_excel_csv','admin\ImportController@deleteCSVEXCEl');
/*** upload_excel_csv
* Upload Route*/
Route::post('users/uploadimage','admin\UploadController@uploadimage');
Route::post('users/{id}/uploadimage','admin\UploadController@deleteUserUpload');
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
    */
    /**
     * Upload Route
     */
Route::post('news/uploadimage','admin\UploadController@uploadimage');
Route::post('news/{id}/uploadimage','admin\UploadController@deleteNewsUpload');
Route::post('news/{id}/newsalbum','admin\UploadController@deleteNewsMultipleImageGallery');

    /**
    |--------------------------------------------------------------------------
    | Login  Routes
    |--------------------------------------------------------------------------
    |*/

Route::get('dashboard','admin\DashboardController@index');
Route::get('chat/add','admin\DashboardController@store_message');
Route::get('chat/get_chat_box_messages','admin\DashboardController@get_chat_box_messages');

    /**
    |--------------------------------------------------------------------------
    | User  Routes
    |--------------------------------------------------------------------------
    |*/
Route::resource('users','admin\UserController');
Route::post('users/search','admin\UserController@search');
Route::post('users/export/excel','admin\UserController@export_excel');

    /**
    |--------------------------------------------------------------------------
    | Role  Routes
    |--------------------------------------------------------------------------
    |*/
Route::resource('roles','admin\RoleController');
Route::post('roles/search','admin\RoleController@search');
Route::post('roles/export/excel','admin\RoleController@export_excel');
    /**
    |--------------------------------------------------------------------------
    | Permission  Routes
    |--------------------------------------------------------------------------
    |*/
Route::resource('permissions','admin\PermissionController');
Route::post('permissions/search','admin\PermissionController@search');
Route::post('permissions/export/excel','admin\PermissionController@export_excel');
/**
    |--------------------------------------------------------------------------
    | Facilities  Routes
    |--------------------------------------------------------------------------
    |*/
Route::get('addfacility','admin\FacilitiesController@add_facility');
Route::get('facilitylist','admin\FacilitiesController@Facility_list');
Route::get('facilityview/{id}','admin\FacilitiesController@Facility_view');
Route::get('operators','admin\FacilitiesController@operators');
Route::get('inspectionchecklist','admin\FacilitiesController@InspectionChecklist');
Route::get('editchecklist','admin\FacilitiesController@EditChecklist');
Route::get('companylist','admin\FacilitiesController@companyList');
Route::get('companylistview/{id}','admin\FacilitiesController@company_list_view');
Route::get('gtfnattachments/{id}','admin\FacilitiesController@GT_FN_attachments');
Route::get('companyfacilities/{id}','admin\FacilitiesController@CompanyFacilities');
Route::get('updateattachment/{id}','admin\FacilitiesController@UpdateAttachment');
Route::post('addattachment','admin\FacilitiesController@AddAttachment');

/**
    |--------------------------------------------------------------------------
    | PaymentList  Routes
    |--------------------------------------------------------------------------
    |*/
Route::get('paymentlist','admin\PaymentController@PaymentList');
Route::get('addpaymentlist','admin\PaymentController@AddPaymentlist');
Route::get('paymentmethod','admin\PaymentController@PaymentMethod');
Route::post('ordersummery','admin\PaymentController@OrderSummery');
Route::post('paymentreview','admin\PaymentController@Paymentreview');
Route::post('ordersubmit','admin\PaymentController@OrderSubmit');
Route::get('add_paymentlist/{id}','admin\PaymentController@Add_Paymentlist');
Route::get('order_view/{id}','admin\PaymentController@OrederView');
Route::get('facilitylist_mail_send/{id}','admin\FacilitiesController@Facilitylist_mail_send');



});
});
});