<?php

Route::group(['middleware' => 'web', 'prefix' => 'backend', 'namespace' => 'Modules\Backend\Http\Controllers'], function()
{
    Route::get('/', 'BackendController@index');
    Route::get('/property/add', 'BackendController@getAddProperty');
    Route::any('/property/import','BackendController@importProperty');
    Route::get('/system/currencies','BackendController@getCurrencies');
    Route::any('/admin/fetch_agents','ProviderController@fetchAgents');
    Route::any('/provider/remoteLogin/{id}','ProviderController@remoteLogIn');
    Route::any('/currecy/fetch_currencies','BackendController@fetchCurrency');
    Route::any('/system/update/{id}','BackendController@editCurrency');
    Route::any('/system/currencies/create','BackendController@createCurrency');
    Route::post('/file/upload','BackendController@uploadFile');
    Route::any('/provider/amentities','BackendController@ProviderAmentities');
    Route::any('/amentities/fetchList','BackendController@fetchAmentities');
    Route::any('/Provider/PasswordReset/{id}','ProviderController@PasswordReset');
    Route::any('/Amentities/create','BackendController@addAmentity');
    Route::any('/provider/amentitiesEdit/{id}','BackendController@editAmentity');
    Route::get('/provider/UtilityList','BackendController@getUtilist');
    Route::any('/PropertyCharges/fetchList','BackendController@fetchChargeList');
    Route::any('/provider/AddNewUtility','BackendController@addUtility');
    Route::post('/file/fetch','BackendController@fetchFiles');
    Route::get('/add/provider','ProviderController@create');
    Route::any('/tenants/AddTenantCharges/{id}','TenantController@addNewCharge');
    Route::any('/Landload/CreatePayment','ProviderController@PayLoadLoads');
    Route::any('/Landload/Payments','ProviderController@getLandloadPayments');
    Route::any('/propery/LandloadPayments','ProviderController@fetchLandloadPayments');
    Route::any('/Landload/Statement','ProviderController@getLandloadStatement');
    Route::any('/Landload/MonthlyDue','ProviderController@getLandloadMonthlyDue');
    Route::any('/landload/GetLandloadPaymentStatement','ProviderController@fetchmlPayments');
    Route::any('/landlord/LandloadPay/{year}','ProviderController@getLandloadCulumative');
    Route::post('/provider/store','ProviderController@store');
    Route::get('/provider/list','ProviderController@index');
    Route::get('/provideraccount/blocked','ProviderAccountController@BlockedAccounts');
    Route::any('/provider/suspend/{id}','ProviderController@suspendAccount');
    Route::any('/provider/approve/{id}','ProviderController@ApproveProvider');
    Route::any('/provider/reject/{id}','ProviderController@rejectProvider');
    Route::any('/tenants/Vacate','VaccationRequestController@Bulk');
    Route::any('/Landload/Reverse','TenantController@ReverseTransaction');
    Route::any('/notices/FetchList','VaccationRequestController@fetchList');
    Route::any('/tenants/ClearBalance/{id}','VaccationRequestController@ClearBalance');
    Route::any('/MassVacation/getTenants/{id}','TenantController@getPropertTenants');
    Route::any('/tenants/Vacated','TenantController@getVacatted');
    Route::post("/property/store","ProviderController@save_property");
    Route::any('/property/Comm/{id}','ProviderController@EditCommisiion');
    Route::get('/property/index',"ProviderController@get_propreties");
    Route::get('/property/update/{id}',"ProviderController@edit_property");
    Route::post('/property/update_details/{id}','ProviderController@update_property');
    Route::any('/provider/account','ProviderController@providerAccount');
    Route::any('/provider/fetch_account','ProviderController@fetchProviderAccounts');
    Route::any('/property/account','ProviderController@propertyAccounts');
    Route::any('/properties/fetch_accounts','ProviderController@fetchPropertiesAccounts');
    Route::any('/provider/syn_accounts','ProviderController@synaccounts');
    Route::any('/property/syn_accounts','ProviderController@synpropertiesAccount');
    Route::any('/property/expenses','ProviderController@getPropertiesExenses');
    Route::any('/property/expense_fetch','ProviderController@fetchExpenses');
    Route::any('/property/expense_add','ProviderController@addExpenses');
    Route::any('/invoice/payme_now/{id}','TenantController@payMyInvoices');
    Route::any('/invoice/download/{id}','TenantController@downloadInvoices');
    Route::any('/payment/Periodics','TenantController@getPriodicPayments');
    Route::any('/payment/GetLandloadPaymentStatement','ProviderController@getStementDetails');
    Route::any('/payment/GetPropertyPriodicPayment','TenantController@getPPayments');
    Route::any('/Property/LandloadPay/{id}','ProviderController@getMinStatement');
    Route::any('/Property/fetchMyPay/{id}','TenantController@getMyPayments');
    Route::any('/invoice/email/{id}','TenantController@emailInvoice');
    Route::any('/Payment/Reverse/{id}','TenantController@ReversePayment');
    Route::post('/property/delete/{id}','ProviderController@delete_property');
    Route::any('/system/invoice-components','TenantController@getSystemCharges');
    Route::any('/provideraccount/setup','ProviderAccountController@getSetUpAccount');
    Route::any('/spaces/moreDetails/{id}','ProviderController@GetMoreSpaceDetails');
    Route::any('/tenants/create','TenantController@create');
    Route::any('/tenants/import','TenantController@importTenants');
    Route::any('/download/template','TenantController@downloadTemplate');
    Route::any('/getProperty/template','TenantController@getTemplate');
    Route::any('/space/add','ProviderController@addspace');
    Route::any('/fetch/space_price/{id}','ProviderController@GetSpacePrice');
    Route::post('/spaces/store','ProviderController@storespace');
    Route::get('/space/listView','ProviderController@getSpaces');
    Route::any('/fetch/property_spaces/{id}','ProviderController@fetchSpaces');
    Route::any('/fetch/occupied/property_spaces/{id}','ProviderController@fetchoccupiedSpaces');
    Route::any('/payment-reminder/index','BackendController@sendReminder');
    Route::post('/tenants/store','TenantController@storeTenants');
    Route::get('/tenants/listView','TenantController@fetchTenants');
    Route::get('/view/deposit/payments','TenantController@fetchdepositpayments');
    Route::get('/view/rent/payments','TenantController@fetchrentPayments');
    Route::get('/make/payments','TenantController@makepayment');
    Route::any('/invoice/GetTenantDetails/{id}','TenantController@getInvoiceDetails');
    Route::any('/fetch/tenant_details/{id}','TenantController@getTenantDetails');
    Route::post('/payment/store','TenantController@storePayment');
    Route::get('/repair/add_new','RepairController@create');
    Route::post('/repair/store','RepairController@store');
    Route::get('/repair/index','RepairController@index');
    Route::get('/category/management/index','CategoryController@index');
    Route::any('/category/management/update/{id}','CategoryController@edit');
    Route::any('/category/management/create','CategoryController@create');
    Route::get('/category/management/sub_index','CategoryController@indexsub');
    Route::get('/property/tenants_list/{id}','TenantController@getTenantReports');
    Route::any('/category/management/s_update/{id}','CategoryController@updatesubcategory');
    Route::any('/category/management/s_create','CategoryController@create_subcategory');
    Route::any('/property/getsubcategories/{id}','CategoryController@getsubcategories');
    Route::any('/get_Cat/category/{id}','ProviderController@getattributes');
    Route::post('/space/delete/{id}','ProviderController@delete_space');
    Route::get('/space/update/{id}','ProviderController@updatespace');
    Route::get('/space/view/{id}','ProviderController@view');
    Route::any('/Spaces/import','ProviderController@ImportSpaces');
    Route::post('/spaces/update/{id}','ProviderController@editspace');
    Route::get('/tenants/emergency_contact','TenantController@emergency_contact');
    Route::get('/tenants/registered_items','TenantController@registered_items');
    Route::get('/tenant/view/{id}','TenantController@view');
    Route::any('/tenant/add_occupants/{id}','TenantController@add_new_occupant');
    Route::any('/occupant/delete/{id}','TenantController@delete_occupant');
    Route::any('/tenants/edit_occupant/{id}','TenantController@edit_occupant');
    Route::any('/tenant/add_item/{id}','TenantController@add_item');
    Route::any('/tenants/edit_item/{id}','TenantController@edit_item');
    Route::post('/item/delete/{id}','TenantController@delete_item');
    Route::any('/tenants/contact/{id}','TenantController@edit_contact');
    Route::get('/tenant/update/{id}','TenantController@updateTenant');
    Route::get('/property/statistics','ProviderController@getstatiscs');
    Route::get('/tenants/students','TenantController@getstudents');
    Route::get('/tenants/nonstudents','TenantController@getnonstudent');
    Route::post('/tenants/update/{id}','TenantController@updateTdetails');
    Route::get('/tenants/lease_expiry','TenantController@lease_expiry');
    Route::get('/property/view/{id}','ProviderController@view_property');
    Route::get('/tenants/charge_break/{id}','TenantController@getChargeBreakdown');
    Route::get('/tenants/charge_break2/{id}','TenantController@getBreakdown');
    Route::get('/space/tenancy/{id}','TenantController@getTenancy');
    Route::get('/invoices/index','TenantController@getInvoices');
    Route::get('invoice/statistics','TenantController@getInvoiceStats');
    Route::get('/invoice/view/{id}','TenantController@invoiceView');
    Route::get('/space/repair/{id}','TenantController@viewRepairCosting');
    Route::any('verify-invoice','TenantController@verifyInvoice');
    Route::get('/space/repair_technician/{id}','TenantController@getTechnician');
    Route::any('/notices/create/{id}','VaccationRequestController@create');
    Route::get('/v-notice/index','VaccationRequestController@notice');
    Route::get('/tenant/dashboard','TenantController@dashboard');
    Route::any('/notices/fetch_notice','VaccationRequestController@fetch_notices');
    Route::get('/v-notice/Complete/{id}','VaccationRequestController@complete');
    Route::get('/leases/fetch_leases/{status}','TenantController@fetch_leases');
    Route::any('/v-notice/extend/{id}','TenantController@extendTenancy');
    Route::any('/tenants/fetch_conatcts','VaccationRequestController@getcontacts');
    Route::any('tenants/fetch_assets','VaccationRequestController@fetch_assets');
    Route::get('/tenants/occupants','TenantController@getoccupants');
    Route::any('/TenantPayment/Reverse','TenantController@startReversal');
    Route::any('/payment/GetPropertyPaidUnits','TenantController@LoadPaidUnits');
    Route::any('/payment/GetPropertyPaidLandlord','TenantController@loadLandloadPayments');
    Route::any('/Transaction/Reverse/{id}','TenantController@ReverseLandLoad');
    Route::any('/Property/NewLandloadPay/{id}','TenantController@fetchAllCreditPayments');
    Route::any('/tenants/fetch_occupants','VaccationRequestController@getOccupants');
    Route::any('/tenants/fetch_invoices/{status}','VaccationRequestController@getInvoices');
    Route::any('/invoice/cancel/{id}','VaccationRequestController@cancelInvoice');
    Route::get('/payment/balances','TenantController@getbalances');
    Route::any('/tenants/fetch_tenants','TenantController@fetchTenantsList');
    Route::get('/tenant/invoice/{id}','TenantController@fetchTenantInvoice');
    Route::any('/category/add','TenantController@createNewCategory');
    Route::any('tenants/fetch_tanant_invoices/{id}','VaccationRequestController@getTenantInvoices');

    Route::get('/payment/history','TenantController@paymentHistory');
Route::any('tenants/fetch_transactions/{tenant_id}','TenantController@getPaymentHistory');
Route::get('/payment/tenants/charges','TenantController@getTenantsCharges');
Route::any('/tenants/fetch_charges/{tenant_id}','TenantController@getTenantCharges');
Route::get('/payment/additions','TenantController@paidPayments');
Route::any('/tenants/fetch_debit_payments/{tenant_id}','TenantController@fetchDebits');
Route::get('/payment/deductions','TenantController@chargedPayments');
Route::any('/tenants/fetch_credit_payments/{tenant_id}','TenantController@fetchCredits');
Route::get('/tenant/payment/view/{id}','VaccationRequestController@viewPayment');
Route::get('/tenant_reports/credits/excel/{column}/{tenant_id}','ReportsController@getCreditReports');
Route::get('/tenant/transaction/excel/{tenant_id}','ReportsController@getTransactions');
Route::get('/reports/tenants','ReportsController@getTenantsPDF');
Route::get('/reports/tenants/{format}','ReportsController@getTenantsExcel');
Route::get('/reports/contact','ReportsController@getConactPDF');
Route::get('/reports/lease_expiry','ReportsController@getLeaseExpiry');
Route::any('category/addsub/{id}','CategoryController@addSubcat');
Route::get('/propery/fetch_propreties/{type}','ProviderController@fetchProperties');
Route::any('/property/manager/{id}','ProviderController@getManager');
Route::any('/property/bank/{id}','ProviderController@getBank');
Route::get('report/property/{id}','ReportsController@propertReports');
Route::get('units/index/{id}','ProviderController@getProperySpaces');
Route::any('propery/fetch_units/{id}','ProviderController@fetchUnits');
Route::get('tenants/index/{id}','ProviderController@fetchUnitTenants');
Route::any('propery/fetch_tenants/{id}','ProviderController@fetchSpaceTenants');
Route::any('propery/fetch_space_tenants/{id}','ProviderController@fetchSpaceTenancyHistory');
Route::get('/repair/index/{id}','ProviderController@getPropertyRepairs');
Route::get('propery/fetch_repairs/{id}','ProviderController@getSpaceRepairs');
Route::any('propery/fetch_spaces/{status}','ProviderController@fetchUnitsAll');
Route::get('/tenants/spaces/index/{id}','ProviderController@getSpaceTenants');
Route::get('/repair/spaces/index/{id}','ProviderController@getSpaceRepairments');
Route::get('/propery/fetch_space_repairs/{id}','ProviderController@fetchGivenSpaceRepairs');
Route::get('/space/invoice/index/{id}','ProviderController@getSpaceInvoices');
Route::get('/space/fetch_invoices/{id}','VaccationRequestController@getSpaceInvoices');
Route::get('/space/payments/index/{id}','ProviderController@getSpacePayments');
Route::any('/tenants/fetch_space_transactions/{id}','TenantController@getSpacePaymentHistory');
Route::get('/reports/properties','PropertyReportsController@getProperiesPdf');
Route::get('/reports/properties/{format}','PropertyReportsController@getProperiesOtherFormats');
Route::get('/property/managers/index','ProviderController@getManagers');
Route::any('/propery/fetch_propreties_manager','ProviderController@fetchManagerList');
Route::get('/properties/managers-reports','PropertyReportsController@getManagersPdf');
Route::get('/properties/bank/index','ProviderController@getBankDetails');
Route::any('/fetch/property/{id}','ProviderController@getPropertName');

 Route::get('/repair/requests/index','RepairController@getRepairRequests');
 Route::any('/repairs_index/fetch_repair_requests/{status}','RepairController@fetchRepairRequest');
 Route::any('verify-ticket','RepairController@getTicket');

 Route::get('/print/invoice/{id}','ReportsController@printInvoice');
 Route::get('/property/gallery','ProviderController@getGallery');
 Route::get('/space/gallery/index/{id}','ProviderController@getSpaceImages');
 Route::get('/property/statistics/{year}','ProviderController@getPropertyPaymentStatistics');
 Route::get('/property/get/statistics/{id}','ProviderController@getPropertyStatistic');
 Route::get('/payment_statistics/graph/{id}','ProviderController@getGraphData');
 Route::get('/statistics_graph/{year}/{property}','ProviderController@getPropertyGraphData');
 Route::get('/property/repairs/statistics/{year}','StatisticsControlerController@getPropertyRepairsStatistics');
 Route::get('/property/get/repair_statistics/{provider}','StatisticsControlerController@getPropertyRepairStatistics');
 Route::get('/message/groups/index','GroupsController@index');
 Route::any('/groups/fetch_groups','GroupsController@fetchGroups');
 Route::any('/group/update/{id}','GroupsController@update');
 Route::any('/group/create','GroupsController@create');
 Route::get('/message/contact/index','ContactController@index');
 Route::any('/contacts/fetch_contacts','ContactController@fetchContacts');
 Route::any('/contacts/edit/{id}',"ContactController@update");
 Route::any('/message/contact/create','ContactController@create');
 Route::any('/message/contact/import','ContactController@import');
 Route::any('/contacts/delete/{id}','ContactController@destroy');
 Route::any('/message/account/top-up','ContactController@accountTopups');
 Route::get('/message/account/top-up/history','ContactController@getHistory');
 Route::get('/contacts/topup/history','ContactController@fetchHistory');
 Route::get('/message/account/top-up/analytics/{year}','ContactController@getStatistics');
 Route::get('/message/groups/statistics','GroupsController@getStatistics');
 Route::any('/groups/fetch_groups_statics','GroupsController@getGroupStatics');
 Route::any('/message/contact/search','ContactController@searchContacts');
 Route::any('/contacts/fetch_contacts_search/{param}/{operant}/{value}','ContactController@searchMyContact');
 Route::any('/message/sent/create','MessageController@create');
 Route::any('/message/count/process/{count}','MessageController@calculateMessage');
 Route::get('/message/scehduled/index','MessageController@getScheduledMails');
 Route::any('/contacts/fetch_scheduled/items','MessageController@fetchScedukle');
 Route::any('/repair/fetch_repairs/{type}','RepairController@fetchRepairs');
 Route::any('/repair/repairitems/index','RepairController@getRepairItems');
 Route::get('/view/repair/{id}','RepairController@viewRepairsDetails');
 Route::get('/repair/repair_items/{id}','RepairController@getMyRepairItems');
 Route::get('/sms/index/approve','MessageController@approvals');
 Route::any('/providers/fetch_recharge/index','MessageController@fetch_histories');
 Route::any('/providers/top_approve/{id}','MessageController@ApprovePurchase');
 Route::any('/providers/top_reject/{id}','MessageController@RejectPurchase');
 Route::get('/module/index','ContactController@getModules');
 Route::get('/module/subscriptions','ContactController@getProviderSubscriptions');
 Route::any('/propvider/get_my_modules/{id}','ContactController@getMyModules');
 Route::get('/property/admin/index','ProviderController@adminView');
 Route::any('/admin/index/fetch_properties','ProviderController@fetchAllProperties');
 Route::any('/plots/create','PlotController@create');
 Route::get('/plots/index','PlotController@index');
 Route::any('/propery/plots/fetch_plots/{status}','PlotController@fetchPlots');
 Route::any('/plots/update/{id}','PlotController@update');
 Route::get('/reports/spaces/export/pdf_reports','ReportsController@getSpacesPDF');
 Route::get('/reports/spaces/export/{format}','ReportsController@getSpacesOtherFormats');
 Route::get('/reports/plots/export/{format}','ReportsController@getPlotOtherFormats');
 Route::get('/property/spaces/statistics','ProviderController@getSpaceStatistcis');
 Route::any('/property/spaces_statistics','ProviderController@fetchStatistics');

 Route::any('/fetch/category/{id}','ProviderController@FetchMyCategory');
 Route::any('/new_charge/create/{id}','TenantController@addCharge');
 Route::any('/addition_charge/list/{id}','TenantController@getAdditionCharges');
 Route::any('/submitted/payments','TenantController@submittedPayments');
 Route::any('/payment/reject/{id}','TenantController@RejectSubmittedPayments');
 Route::any('/payments/approve-payment/{id}','TenantController@ApproveSubmittedPayments');
 Route::any('/properties/transaction','ProviderController@getPropertiesTransaction');
 Route::any('/propery/fetch_property_transaction/{type}','ProviderController@fetchPropertyTransactions');
 Route::any('/propert_transaction/view/{id}','ProviderController@ViewTransactionDetails');
 Route::any('/provider/transaction','ProviderController@getProviderTransactions');
 Route::any('/provider/fetch_provider_transaction/{id}','ProviderController@fetchProviderTransaction');
 Route::any('/payment/tenants/summary','ProviderController@getMonthlySummary');
 Route::any('/payment/CreateNewInvoice','TenantController@CreateNewInvoice');
 Route::any('/reports/monthlyBreakdown','ProviderController@getMonthlyBreadown');
 Route::any('/tenants/fetch_monthly_summary','ProviderController@fetchMonlySummary');
 Route::any('/utility-bills/create','UtilityController@create');
 Route::any('/utility-bills/fetch_units/{id}','UtilityController@getUnitsReading');
 Route::any('/utility-bills/index','UtilityController@getUtilityBills');
 Route::any('/utility-bills/fetch_bills','UtilityController@fetchBills');
 Route::any('/utility-bill/water/{id}','UtilityController@getWaterDetails');
 Route::any('/utility-bill/power/{id}','UtilityController@getPowerDetails');
 Route::any('/utility-bill/view/{id}','UtilityController@viewDetails');
 Route::any('/utility-bill/edit/{id}','UtilityController@editDetails');
 Route::any('//payment/tenants/fatutaPro/{id}','TenantController@getProSpaces');

 Route::any('/templates/create','TemplateController@create');
 Route::any('/templates/index','TemplateController@index');
 Route::any('/templates/fetch_templates','TemplateController@fetchTemplates');
 Route::get('/templates/view/{id}','TemplateController@viewTemplate');
 Route::any('/template/edit-attribute/{id}','TemplateController@editAttribute');
 Route::any('/template/edit/{id}','TemplateController@editTemplate');
 Route::any('/reports/payment-report','ProviderController@getMonthlyReports');
 Route::any('/tenant/editLogin/{id}','TenantController@editLoginDetails');
 Route::any('/make/bulkpayment','TenantController@addBulkPayments');
 Route::any('/make/bulkloadTenants/{id}','TenantController@loadTenants');
 Route::any('/Providers/Spaces','ProviderController@getProviderSpaces');

 Route::any('/RenterAccount/setup','UserController@AccountSetUp');
 Route::get('/spaces/bookings','ProviderController@getMyBookings');
 Route::any('/properties/fetch_bookings','ProviderController@fetchBookings');
 Route::any('/bookings/markAs/{id}','ProviderController@markAs');
 Route::any('/make/getInvoiceComponent','TenantController@GetInvoiceComponents');
 Route::any('/make/getPropertyUnits/{id}','TenantController@getPropertTenantUnits');
 Route::any('/properties/NewExpenses','TenantController@addNewExpenses');
 Route::any('/getPropertyTenants/{id}','TenantController@getPropertyTenants');
 Route::any('/properties/Expenses','TenantController@getPExpenseList');
 Route::any('/propery/fetchExpenseList','TenantController@fetchExpenseList');
 Route::any('/User/Create','ProviderController@CreateUser');
 Route::any('/Landload/Create','LandlordController@create');
 Route::any('/Landload/Index','LandlordController@index');
 Route::any('/landlords/fetchList','LandlordController@fetchList');
 Route::any('/Landload/Edit/{id}','LandlordController@EditDetails');
 Route::any('/Landload/getProperties/{id}','LandlordController@getMyProperies');
 Route::any("/User/Index","ProviderController@getUsers");
 Route::any('/Users/list',"ProviderController@fetchUsers");
 Route::any("/user/Edit/{P}","ProviderController@EditUser");
 Route::any("/users/ResetPassword/{id}","ProviderController@ResetPassword");



});