<commit_before><?php

use App\Assinatura;
use App\Registration;

Route::get('/', function() {
  return redirect('registration');
});

Route::get('/manifesto', function () {
  // TODO: pagination
  return view('manifesto.index')->with([
    'total_count' => Assinatura::all()->count(),
    'assinaturas' => Assinatura::orderBy('prioridade', 'desc')
                               ->orderBy('created_at')
                               ->get(),
  ]);
});

Route::get('/schedule', function() {
  return view('schedule.index');
});

Route::resource('assinatura', 'AssinaturaController', [
    'except' => [
        'destroy',
        'edit',
        'update',
    ]
]);

Route::group(['prefix' => 'registration'], function() {
  // Part 1
  Route::get('/', 'RegistrationController@index');

  // Part 2
  Route::get('/uf/{uf}', 'RegistrationController@uf');

  // Transition 2--3
  Route::post('/store', 'RegistrationController@store');

  // Transition 2--3 fix
  Route::get('/fix-store', 'RegistrationController@fix_store');

  // Parts 3, 4
  Route::get('/code/{code}', 'RegistrationController@code');

  // Transition 3--4
  Route::post('/payment_notification', 'RegistrationController@notification');
});

Route::get('/r/{uf}/{key}', function($uf, $key) {
  $hash = hash_hmac('sha256', $uf, env('APP_KEY'), false);
  if ($hash != $key) {
    abort(404);
    return null;
  }

  return view('registrations.show')->with([
    'uf' => $uf,
    'users' => Registration::where('uf', $uf)->get(),<commit_msg>add /r/br/<commit_after><?php

use App\Assinatura;
use App\Registration;

Route::get('/', function() {
  return redirect('registration');
});

Route::get('/manifesto', function () {
  // TODO: pagination
  return view('manifesto.index')->with([
    'total_count' => Assinatura::all()->count(),
    'assinaturas' => Assinatura::orderBy('prioridade', 'desc')
                               ->orderBy('created_at')
                               ->get(),
  ]);
});

Route::get('/schedule', function() {
  return view('schedule.index');
});

Route::resource('assinatura', 'AssinaturaController', [
    'except' => [
        'destroy',
        'edit',
        'update',
    ]
]);

Route::group(['prefix' => 'registration'], function() {
  // Part 1
  Route::get('/', 'RegistrationController@index');

  // Part 2
  Route::get('/uf/{uf}', 'RegistrationController@uf');

  // Transition 2--3
  Route::post('/store', 'RegistrationController@store');

  // Transition 2--3 fix
  Route::get('/fix-store', 'RegistrationController@fix_store');

  // Parts 3, 4
  Route::get('/code/{code}', 'RegistrationController@code');

  // Transition 3--4
  Route::post('/payment_notification', 'RegistrationController@notification');
});

Route::get('/r/{uf}/{key}', function($uf, $key) {
  $hash = hash_hmac('sha256', $uf, env('APP_KEY'), false);
  if ($hash != $key) {
    abort(404);
    return null;
  }

  if ($uf === "br") {
    $users = Registration::all();
  } else {
    $users = Registration::where('uf', $uf)->get();
  }

  return view('registrations.show')->with([
    'uf' => $uf,
    'users' => $users,
{'fraction_non_alphanumeric': 0.2235142118863049, 'fraction_numerical': 0.0103359173126615, 'mean_word_length': 3.430615164520744, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '3666083', 'n_tokens_mistral': 1011, 'n_tokens_neox': 966, 'n_words': 172}