<?php

Route::group ( [ 
		'prefix' => 'admin',
		'middleware' => 'web' 
], function () {	
	Route::group ( [
			'prefix' => 'wysiwyg',
			'namespace' => 'Rvsitebuilder\Wysiwyg\Http\Controllers\Backend',
			'middleware' => 'admin'
	], function () {
		Route::group ( [ 
			'prefix' => 'form',			
		], function () {
			Route::get ( '/', [ 
					'as' => 'admin.wysiwyg.form.index',
					'uses' => 'FormController@index' 
			] );
			
			Route::post('/store', [
					'as' => 'admin.wysiwyg.form.store',
					'uses' => 'FormController@store',
			]);
			
			Route::post('/update/{itemid}', [
					'as' => 'admin.wysiwyg.form.update',
					'uses' => 'FormController@update',
			]);
			
			Route::post ( '/destroy/{itemid}', [
					'as' => 'admin.wysiwyg.form.destroy',
					'uses' => 'FormController@destroy'
			] );
			
			Route::post('/saveformdata', [
			    'as' => 'admin.wysiwyg.form.saveformdata',
			    'uses' => 'FormController@saveformdata',
			]);
		
		} );
	} );		
} );

