<?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('edit/{route}/{id}/{tablename}','AdminlogController@edit');
// Route::get('delete/{route}/{id}/{tablename}/{folername}','AdminlogController@delete');


// Route::get('adminlog', 'AdminlogController@getIndex');


// Route::get('admin_about', 'AboutController@getIndex');
// Route::post('admin_about', 'AboutController@store');



// Route::get('admin_slider', 'SliderController@getIndex');
// Route::post('admin_slider', 'SliderController@store');
// Route::post('admin_slider/update/{id}', 'SliderController@update');


// Route::get('admin_event', 'EventController@getIndex');
// Route::post('admin_event', 'EventController@store');
// Route::post('admin_event/update/{id}', 'EventController@update');
// Route::get('deleventimage', 'EventController@getdelimage');

// Route::get('admin_gallery', 'GalleryController@getIndex');
// Route::post('admin_gallery', 'GalleryController@store');
// Route::post('admin_gallery/update/{id}', 'GalleryController@update');
// Route::get('delgalleryimage', 'GalleryController@getdelimage');

// Route::get('admin_team_member', 'TeamMemberController@getIndex');
// Route::post('admin_team_member', 'TeamMemberController@store');
// Route::post('admin_team_member/update/{id}', 'TeamMemberController@update');

// Route::get('admin_testimonial', 'TestimonialController@getIndex');
// Route::post('admin_testimonial', 'TestimonialController@store');
// Route::post('admin_testimonial/update/{id}', 'TestimonialController@update');

// Route::get('admin_news', 'NewsController@getIndex');
// Route::post('admin_news', 'NewsController@store');
// Route::post('admin_news/update/{id}', 'NewsController@update');

// Route::get('admin_message_from', 'MessageFromController@getIndex');
// Route::post('admin_message_from', 'MessageFromController@store');
// Route::post('admin_message_from/update/{id}', 'MessageFromController@update');

// Route::get('admin_service', 'ServiceController@getIndex');
// Route::post('admin_service', 'ServiceController@store');
// Route::post('admin_service/update/{id}', 'ServiceController@update');

// Route::get('admin_report', 'ReportController@getIndex');
// Route::post('admin_report', 'ReportController@store');
// Route::post('admin_report/update/{id}', 'ReportController@update');


// // <- ****** CLIENT ****** ->


// Route::get('/', 'PublicController@getIndex');

Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');

 // Password Reset Routes...
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');

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

 // Registration Routes...
Route::get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
Route::post('register', 'Auth\RegisterController@register');	

Route::get('edit/{route}/{id}/{tablename}','AdminlogController@edit');
Route::get('delete/{route}/{id}/{tablename}/{folername}','AdminlogController@delete');


Route::get('adminlog', 'AdminlogController@getIndex');


Route::get('admin_about', 'AboutController@getIndex');
Route::post('admin_about', 'AboutController@store');



Route::get('admin_slider', 'SliderController@getIndex');
Route::post('admin_slider', 'SliderController@store');
Route::post('admin_slider/update/{id}', 'SliderController@update');


Route::get('admin_event', 'EventController@getIndex');
Route::post('admin_event', 'EventController@store');
Route::post('admin_event/update/{id}', 'EventController@update');
Route::get('deleventimage', 'EventController@getdelimage');

Route::get('admin_gallery', 'GalleryController@getIndex');
Route::post('admin_gallery', 'GalleryController@store');
Route::post('admin_gallery/update/{id}', 'GalleryController@update');
Route::get('delgalleryimage', 'GalleryController@getdelimage');

Route::get('admin_team_member', 'TeamMemberController@getIndex');
Route::post('admin_team_member', 'TeamMemberController@store');
Route::post('admin_team_member/update/{id}', 'TeamMemberController@update');

Route::get('admin_testimonial', 'TestimonialController@getIndex');
Route::post('admin_testimonial', 'TestimonialController@store');
Route::post('admin_testimonial/update/{id}', 'TestimonialController@update');

Route::get('admin_video', 'VideoController@getIndex');
Route::post('admin_video', 'VideoController@store');
Route::get('admin_video/edit/{id}', 'VideoController@edit');
Route::post('admin_video/update/{id}', 'VideoController@update');
Route::get('admin_video/delete/{id}', 'VideoController@destroy');

Route::get('admin_news', 'NewsController@getIndex');
Route::post('admin_news', 'NewsController@store');
Route::post('admin_news/update/{id}', 'NewsController@update');

Route::get('admin_message_from', 'MessageFromController@getIndex');
Route::post('admin_message_from', 'MessageFromController@store');
Route::post('admin_message_from/update/{id}', 'MessageFromController@update');

Route::get('admin_board_of_director', 'BoardOfDirectorController@getIndex');
Route::post('admin_board_of_director', 'BoardOfDirectorController@store');
Route::post('admin_board_of_director/update/{id}', 'BoardOfDirectorController@update');

Route::get('admin_service', 'ServiceController@getIndex');
Route::post('admin_service', 'ServiceController@store');
Route::post('admin_service/update/{id}', 'ServiceController@update');

Route::get('admin_report', 'ReportController@getIndex');
Route::post('admin_report', 'ReportController@store');
Route::post('admin_report/update/{id}', 'ReportController@update');

Route::get('admin_useful_link', 'UsefulLinkController@getIndex');
Route::post('admin_useful_link', 'UsefulLinkController@store');
Route::post('admin_useful_link/update/{id}', 'UsefulLinkController@update');


Route::get('admin_pp', 'PpController@getIndex');
Route::post('admin_pp', 'PpController@store');


Route::get('admin_ir', 'IrController@getIndex');
Route::post('admin_ir', 'IrController@store');
Route::post('admin_ir/update/{id}', 'IrController@update');


Route::get('admin_career', 'CareerController@getIndex');
Route::post('admin_career', 'CareerController@store');
Route::post('admin_career/update/{id}', 'CareerController@update');


Route::get('admin_popup', 'AdminlogController@getPopup');
Route::post('admin_popup', 'AdminlogController@store');


Route::get('admin_download', 'DownloadController@getIndex');
Route::post('admin_download', 'DownloadController@store');
Route::post('admin_download/update/{id}', 'DownloadController@update');

Route::get('admin_today', 'TodayController@index');
Route::post('admin_today', 'TodayController@store');
Route::get('admin_today/edit/{id}', 'TodayController@edit');
Route::post('admin_today/update/{id}', 'TodayController@update');

Route::get('admin_affiliation', 'AffiliationController@index');
Route::post('admin_affiliation', 'AffiliationController@store');
Route::get('admin_affiliation/edit/{id}', 'AffiliationController@edit');
Route::post('admin_affiliation/update/{id}', 'AffiliationController@update');
Route::get('admin_affiliation/delete/{id}', 'AffiliationController@destroy');

});






// <- ****** CLIENT ****** ->
Route::get('/{lng}', 'PublicController@getIndex');
Route::get('/', function(){

return redirect('/en')->with('lng',"en");

});


Route::get('/{lng}/news', 'PublicController@getNewsAll');
Route::get('/{lng}/news/{title}', 'PublicController@getSingleNews');
Route::get('/{lng}/event', 'PublicController@getEventAll');
Route::get('/{lng}/event/{title}', 'PublicController@getSingleEvent');
Route::get('/{lng}/about_us', 'PublicController@getAboutUs');
Route::get('/{lng}/message_from', 'PublicController@getMessageFrom');
Route::get('/{lng}/board_of_directors', 'PublicController@getboard_of_directors');
Route::get('/{lng}/management_team', 'PublicController@getmanagement_team');

Route::get('/{lng}/gallery', 'PublicController@getgallery');
Route::get('/{lng}/gallery/{title}', 'PublicController@getSingleGallery');

Route::get('/{lng}/service', 'PublicController@getService');
Route::get('/{lng}/service/{title}', 'PublicController@getSingleService');

Route::get('/{lng}/report', 'PublicController@getReport');
Route::get('/{lng}/policy&procedure', 'PublicController@getPp');
Route::get('/{lng}/interest_rates', 'PublicController@getIr');
Route::get('/{lng}/career', 'PublicController@getCareer');
Route::get('/{lng}/contact', 'PublicController@getContact');
Route::post('/{lng}/sendcontact', 'PublicController@postContact');
Route::get('/{lng}/download', 'PublicController@getDownload');

Route::get('/{lng}/videos', 'PublicController@videos');
Route::get('/{lng}/press', 'PublicController@press');
Route::get('/{lng}/singlepress', 'PublicController@singlepress');


