<commit_before><?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::group([], function () {
	
	/*
	| Index route
	*/
	Route::get('/', 'WelcomeController@getIndex');
	
	
	/*
	| Control Panel (cp)
	| Anything having to deal with secure information goes here.
	| This includes:
	| - Registration, Login, and Account Recovery.
	| - Contributor status.
	| - Board creation, Board management, Volunteer management.
	| - Top level site management.
	*/
	Route::group([
		'namespace'  => 'Panel',
		'middleware' => 'App\Http\Middleware\VerifyCsrfToken',
		'prefix'     => 'cp',
	], function()
	{
		// Simple /cp/ requests go directly to /cp/home
		Route::get('/', 'HomeController@getIndex');
		
		Route::controllers([
			// /cp/auth handles sign-ins and registrar work.
			'auth'     => 'AuthController',
			// /cp/home is a landing page.
			'home'     => 'HomeController',
			// /cp/password handles password resets and recovery.
			'password' => '<PASSWORD>',
		]);
		
		// /cp/donate is a Stripe cashier system for donations.
		if (env('CONTRIB_ENABLED', false))
		{
			Route::controller('donate', 'DonateController');
		}
		
		Route::group([
			'namespace' => 'Boards',
			'prefix'    => 'boards',
		], function()
		{
			Route::get('/', 'BoardsController@getIndex');
			Route::get('create', 'BoardsController@getCreate');
			Route::put('create', 'BoardsController@putCreate');
		});
		
		Route::group([
			'namespace' => 'Boards',
			'prefix'    => 'board',
		], function()
		{
			Route::controller('{board}', 'ConfigController');
		});
		
		Route::group([
			'namespace' => 'Site',
			'prefix'    => 'site',
		], function()
		{
			Route::get('/', 'SiteController@getIndex');
			Route::get('phpinfo', 'SiteController@getPhpinfo');
			
			Route::controllers([
				'config' => 'ConfigController',
			]);
		});
		
		Route::group([
			'namespace' => 'Users',
			'prefix'    => 'users',
		], function()
		{
			Route::get('/', 'UsersController@getIndex');
		});
		
		Route::group([
			'namespace' => 'Roles',
			'prefix'    => 'roles',
		], function()
		{
			Route::controller('permissions/{role}', 'PermissionsController');
			Route::get('permissions', 'RolesController@getPermissions');
		});
		
	});
	
	
	/*
	| Page Controllers
	| Catches specific strings to route to static content.
	*/
	if (env('CONTRIB_ENABLED', false))
	{
		Route::get('contribute', 'PageController@getContribute');
	}
	
	
	/*
	| Board (/anything/)
	| A catch all. Used to load boards.
	*/<commit_msg>Fixed API support for contribute<commit_after><?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::group([], function () {
	
	/*
	| Index route
	*/
	Route::get('/', 'WelcomeController@getIndex');
	
	
	/*
	| Control Panel (cp)
	| Anything having to deal with secure information goes here.
	| This includes:
	| - Registration, Login, and Account Recovery.
	| - Contributor status.
	| - Board creation, Board management, Volunteer management.
	| - Top level site management.
	*/
	Route::group([
		'namespace'  => 'Panel',
		'middleware' => 'App\Http\Middleware\VerifyCsrfToken',
		'prefix'     => 'cp',
	], function()
	{
		// Simple /cp/ requests go directly to /cp/home
		Route::get('/', 'HomeController@getIndex');
		
		Route::controllers([
			// /cp/auth handles sign-ins and registrar work.
			'auth'     => 'AuthController',
			// /cp/home is a landing page.
			'home'     => 'HomeController',
			// /cp/password handles password resets and recovery.
			'password' => '<PASSWORD>',
		]);
		
		// /cp/donate is a Stripe cashier system for donations.
		if (env('CONTRIB_ENABLED', false))
		{
			Route::controller('donate', 'DonateController');
		}
		
		Route::group([
			'namespace' => 'Boards',
			'prefix'    => 'boards',
		], function()
		{
			Route::get('/', 'BoardsController@getIndex');
			Route::get('create', 'BoardsController@getCreate');
			Route::put('create', 'BoardsController@putCreate');
		});
		
		Route::group([
			'namespace' => 'Boards',
			'prefix'    => 'board',
		], function()
		{
			Route::controller('{board}', 'ConfigController');
		});
		
		Route::group([
			'namespace' => 'Site',
			'prefix'    => 'site',
		], function()
		{
			Route::get('/', 'SiteController@getIndex');
			Route::get('phpinfo', 'SiteController@getPhpinfo');
			
			Route::controllers([
				'config' => 'ConfigController',
			]);
		});
		
		Route::group([
			'namespace' => 'Users',
			'prefix'    => 'users',
		], function()
		{
			Route::get('/', 'UsersController@getIndex');
		});
		
		Route::group([
			'namespace' => 'Roles',
			'prefix'    => 'roles',
		], function()
		{
			Route::controller('permissions/{role}', 'PermissionsController');
			Route::get('permissions', 'RolesController@getPermissions');
		});
		
	});
	
	
	/*
	| Page Controllers
	| Catches specific strings to route to static content.
	*/
	if (env('CONTRIB_ENABLED', false))
	{
		Route::get('contribute', 'PageController@getContribute');
		Route::get('contribute.json', 'API\PageController@getContribute');
	}
	
	
	/*
	| Board (/anything/)
	| A catch all. Used to load boards.
	*/
{'fraction_non_alphanumeric': 0.22426470588235295, 'fraction_numerical': 0.0, 'mean_word_length': 2.780939774983455, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3904971', 'n_tokens_mistral': 1993, 'n_tokens_neox': 1731, 'n_words': 418}