<?php

Route::group ( [ 
		'prefix' => 'admin',
		'middleware' => 'web' 
], function () {	
	Route::group ( [
			'prefix' => 'wysiwyg',
			'namespace' => 'Rvsitebuilder\Wysiwyg\Http\Controllers\Backend',
			'middleware' => 'admin'
	], function () {
		Route::group ( [ 
			'prefix' => 'common',			
		], function () {
			Route::get ( '/', [ 
					'as' => 'admin.wysiwyg.common.index',
					'uses' => 'CommonController@index' 
			] );
			
			//images
			Route::post('/deleteimage', [
			        'as' => 'admin.wysiwyg.common.deleteimage',
			        'uses' => 'CommonController@deleteimage',
			]);
			Route::post('/saveimage', [
					'as' => 'admin.wysiwyg.common.saveimage',
					'uses' => 'CommonController@saveimage',
			]);
			
			Route::post('/uploadimage', [
			    'as' => 'admin.wysiwyg.common.uploadimage',
			    'uses' => 'CommonController@uploadimage',
			]);
			
			Route::post('/buildimagesjson', [
					'as' => 'admin.wysiwyg.common.buildimagesjson',
					'uses' => 'CommonController@buildimagesjson',
			]);
			Route::post('/defacementimage', [
					'as' => 'admin.wysiwyg.common.defacementimage',
					'uses' => 'CommonController@defacementimage',
			]);
			
			//link2 > documents
			Route::get ( '/listdocuments', [
					'as' => 'admin.wysiwyg.common.listdocuments',
					'uses' => 'CommonController@listdocuments'
			] );
			Route::post ( '/deletedocuments', [
					'as' => 'admin.wysiwyg.common.deletedocuments',
					'uses' => 'CommonController@deletedocuments'
			] );
			Route::post ( '/uploaddocuments', [
					'as' => 'admin.wysiwyg.common.uploaddocuments',
					'uses' => 'CommonController@uploaddocuments'
			] );
			
			//tagfolder
			Route::post ( '/addtagfolder', [
					'as' => 'admin.wysiwyg.common.addtagfolder',
					'uses' => 'CommonController@addtagfolder'
			] );
			Route::post ( '/addtagImage', [
					'as' => 'admin.wysiwyg.common.addtagImage',
					'uses' => 'CommonController@addtagImage'
			] );
			Route::post ( '/addtagImageMulti', [
					'as' => 'admin.wysiwyg.common.addtagImageMulti',
					'uses' => 'CommonController@addtagImageMulti'
			] );
			Route::post ( '/deletetagfolder', [
					'as' => 'admin.wysiwyg.common.deletetagfolder',
					'uses' => 'CommonController@deletetagfolder'
			] );
			Route::post ( '/updatetagfolder', [
					'as' => 'admin.wysiwyg.common.updatetagfolder',
					'uses' => 'CommonController@updatetagfolder'
			] );

			
		} );
	} );		
} );