<?php
	/**
	 * Rutas para el modulo.
	 */
	

	/**
	 * Se solicita que el usuario este autenticado antes de acceder a las siguientes rutas.
	 */
	Route::group(array('prefix' => 'admin', 'namespace' => 'App\Modules\Backend\Articles\Controllers', 'before' => 'auth'), function()
	{
		Route::get('articles/{id}', ['uses' => 'ArticleController@getIndex']);
		Route::get('articles/{id}/tabla-ajax', ['uses' => 'ArticleController@getTablaAjax']);
		Route::get('articles/add/{id}', ['uses' => 'ArticleController@getAdd']);
		Route::post('articles/add', ['uses' => 'ArticleController@postAdd']);
		Route::get('articles/edit/{id}', ['uses' => 'ArticleController@getEdit']);
		Route::put('articles/edit/{id}', ['uses' => 'ArticleController@putEdit']);
		Route::delete('articles/edit/{id}', ['uses' => 'ArticleController@deleteEdit']);
		//Route::controller('articles', 'ArticleController');
		//
		Route::get('records/index', ['as' => 'records.index', 'uses' => 'RecordsController@getIndex']);
		Route::get('records/tabla-ajax', ['as' => 'records.tabla-ajax', 'uses' => 'RecordsController@getTablaAjax']);
		Route::get('records/show/{id}', ['as' => 'records.show', 'uses' => 'RecordsController@show']);

	});