<commit_before><?php

/**
 * The projects dashboard
 */
Router::register('GET /projects', function()
{
	return View::make('layouts.default')
		->nest('content', 'projects.index');
});

View::composer('projects.index', function($view)
{
	$view['projects'] = Project::where('user_id', '=', Session::get(Auth::user_key))
		->where('active', '=', 1)
		->get();
});

/**
 * View a project and all of its previews
 */
Router::register('GET /projects/(:num)', function()
{
	return View::make('layouts.default')
		->with('project', 'all of the project info')
		->nest('content', 'projects.view');
});

/**
 * Display create a new project view
 */
Router::register('GET /projects/new', function()<commit_msg>Added a composer for the projects view<commit_after><?php

/**
 * The projects dashboard
 */
Router::register('GET /projects', function()
{
	return View::make('layouts.default')
		->nest('content', 'projects.index');
});

View::composer('projects.index', function($view)
{
	$view['projects'] = Project::where('user_id', '=', Session::get(Auth::user_key))
		->where('active', '=', 1)
		->get();
});

/**
 * View a project and all of its previews
 */
Router::register('GET /projects/(:num)', function()
{
	return View::make('layouts.default')
		->nest('content', 'projects.view');
});

View::composer('projects.view', function($view)
{
	$view['previews'] = Preview::where('project_id', '=', URI::segment(2))->get();
});

/**
 * Display create a new project view
 */
Router::register('GET /projects/new', function()
{'fraction_non_alphanumeric': 0.23362011912640634, 'fraction_numerical': 0.001985440105890139, 'mean_word_length': 5.545454545454546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4016471', 'n_tokens_mistral': 501, 'n_tokens_neox': 485, 'n_words': 102}