<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 Closure to execute when that URI is requested.
|
*/

# Home
// Route::controller('home', 'BetaController');
// Route::get('/', 'BetaController@getIndex');

// Method #1 -- currently employed
Route::get('/', function()
{
    //essentially the concept is that the user views a beta page if not logged in
    //or else the dashboard if logged in, old welcome page will never be shown
    if (is_null(Auth::user())){
        //return Redirect::intended(URL::action('HomeController@getWelcome'));
        return Redirect::to('https://eesoc.com/home');
    }
    else {
        if(Auth::user()->is_admin){
            //return Redirect::intended(URL::action('HomeController@getWelcome'));
            return Redirect::to('https://eesoc.com/admin');
        }
        else {
            return Redirect::to('https://eesoc.com/dashboard');
        }   
    }
});

// Method #2 -- has some bugs
// Route::get('/', 'BetaController@getIndex');
// // });
// Route::group(['before' => ''], function() {
//     Route::get('/', 'BetaController@getIndex');
//     //Route::get('/', 'HomeController@getWelcome');
// });
// Route::group(['middleware' => 'auth.member'], function() {
//     Route::get('/', 'HomeController@getWelcome');
// });

// Method #3 -- may have bugs
// Route::group(['middleware' => 'auth.guest'], function() {
//     // Route::get('/', function()
//     // {
//     //     return Redirect::to('https://eesoc.com/beta');
//     // });
//     Route::get('/', 'BetaController@getIndex');
// });
// Route::group(['middleware' => 'auth.member'], function() {
//     Route::get('/', function() {
//         return Redirect::to('https://eesoc.com/admin');
//     });
// });
// Route::get('/', function()
// {<commit_msg>rputes php changes to make tests passing<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 Closure to execute when that URI is requested.
|
*/

# Home
// Method #0 -- only here for tests passing
// TODO: Fix / modify tests to accept method #1 without assertion errors
Route::controller('home', 'BetaController');
Route::get('/', 'BetaController@getIndex');

// Method #1 -- currently employed on webserver, works fine
// Route::get('/', function()
// {
//     //essentially the concept is that the user views a beta page if not logged in
//     //or else the dashboard if logged in, old welcome page will never be shown
//     if (is_null(Auth::user())){
//         //return Redirect::intended(URL::action('HomeController@getWelcome'));
//         return Redirect::to('https://eesoc.com/home');
//     }
//     else {
//         if(Auth::user()->is_admin){
//             //return Redirect::intended(URL::action('HomeController@getWelcome'));
//             return Redirect::to('https://eesoc.com/admin');
//         }
//         else {
//             return Redirect::to('https://eesoc.com/dashboard');
//         }   
//     }
// });

// Method #2 -- has some bugs
// Route::get('/', 'BetaController@getIndex');
// // });
// Route::group(['before' => ''], function() {
//     Route::get('/', 'BetaController@getIndex');
//     //Route::get('/', 'HomeController@getWelcome');
// });
// Route::group(['middleware' => 'auth.member'], function() {
//     Route::get('/', 'HomeController@getWelcome');
// });

// Method #3 -- may have bugs
// Route::group(['middleware' => 'auth.guest'], function() {
//     // Route::get('/', function()
//     // {
//     //     return Redirect::to('https://eesoc.com/beta');
//     // });
//     Route::get('/', 'BetaController@getIndex');
// });
// Route::group(['middleware' => 'auth.member'], function() {
//     Route::get('/', function() {
//         return Redirect::to('https://eesoc.com/admin');
//     });
// });
// Route::get('/', function()
// {
{'fraction_non_alphanumeric': 0.27214465552758066, 'fraction_numerical': 0.0018310826276035706, 'mean_word_length': 2.1666666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 10, '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': '2430685', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1207, 'n_words': 300}