<commit_before><?php

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

$app->get('/', function () use ($app) {
    return $app->welcome();
});

$app->get('/', function () use ($app) {
    return "Ævintýri RESTful API by <NAME> / tollwerk GmbH (https://jkphl.is)";
});

$app->group(['prefix' => 'api/v1', 'namespace' => 'App\Http\Controllers'], function ($app) {

    // Country
    $app->get('country', [
        'as' => 'countries',
        'uses' => 'CountryController@listCountries'
    ]);
    $app->get('country/{id}', [
        'as' => 'country',
        'uses' => 'CountryController@getCountry'
    ]);

    // Day
    $app->get('day', [
        'as' => 'days',
        'uses' => 'DayController@listDays'
    ]);
    $app->get('day/{id}', [
        'as' => 'day',
        'uses' => 'DayController@getDay'
    ]);
    $app->post('day', 'DayController@createDay');
    $app->put('day/{id}', 'DayController@updateDay');
    $app->delete('day/{id}', 'DayController@deleteDay');

    // Event
    $app->get('event', 'EventController@listEvents');
    $app->get('event/{id}', 'EventController@getEvent');
    $app->post('event', 'EventController@createEvent');
    $app->put('event/{id}', 'EventController@updateEvent');
    $app->delete('event/{id}', 'EventController@deleteEvent');

    // Link
    $app->get('link', 'LinkController@listLinks');
    $app->get('link/{id}', 'LinkController@getLink');
    $app->post('link', 'LinkController@createLink');
    $app->put('link/{id}', 'LinkController@updateLink');
    $app->delete('link/{id}', 'LinkController@deleteLink');

    // Organizer
    $app->get('organizer', 'OrganizerController@listOrganizers');
    $app->get('organizer/{id}', 'OrganizerController@getOrganizer');
    $app->post('organizer', 'OrganizerController@createOrganizer');
    $app->put('organizer/{id}', 'OrganizerController@updateOrganizer');
    $app->delete('organizer/{id}', 'OrganizerController@deleteOrganizer');

    // Presenter
    $app->get('presenter', 'PresenterController@listPresenters');
    $app->get('presenter/{id}', 'PresenterController@getPresenter');
    $app->post('presenter', 'PresenterController@createPresenter');
    $app->put('presenter/{id}', 'PresenterController@updatePresenter');
    $app->delete('presenter/{id}', 'PresenterController@deletePresenter');

    // Room
    $app->get('room', 'RoomController@listRooms');
    $app->get('room/{id}', 'RoomController@getRoom');
    $app->post('room', 'RoomController@createRoom');
    $app->put('room/{id}', 'RoomController@updateRoom');
    $app->delete('room/{id}', 'RoomController@deleteRoom');

    // Session
    $app->get('session', 'SessionController@listSessions');
    $app->get('session/{id}', 'SessionController@getSession');
    $app->post('session', 'SessionController@createSession');
    $app->put('session/{id}', 'SessionController@updateSession');
    $app->delete('session/{id}', 'SessionController@deleteSession');

    // Series
    $app->get('series', 'SeriesController@listSeriess');
    $app->get('series/{id}', 'SeriesController@getSeries');
    $app->post('series', 'SeriesController@createSeries');
    $app->put('series/{id}', 'SeriesController@updateSeries');
    $app->delete('series/{id}', 'SeriesController@deleteSeries');

    // Tag
    $app->get('tag', 'TagController@listTags');
    $app->get('tag/{id}', 'TagController@getTag');
    $app->post('tag', 'TagController@createTag');
    $app->put('tag/{id}', 'TagController@updateTag');
    $app->delete('tag/{id}', 'TagController@deleteTag');

    // Venue
    $app->get('venue', 'VenueController@listVenues');
    $app->get('venue/{id}', 'VenueController@getVenue');
    $app->post('venue', 'VenueController@createVenue');
    $app->put('venue/{id}', 'VenueController@updateVenue');
    $app->delete('venue/{id}', 'VenueController@deleteVenue');
});<commit_msg>Added named routes for all models<commit_after><?php

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

$app->get('/', function () use ($app) {
    return $app->welcome();
});

$app->get('/', function () use ($app) {
    return "Ævintýri RESTful API by <NAME> / tollwerk GmbH (https://jkphl.is)";
});

$app->group(['prefix' => 'api/v1', 'namespace' => 'App\Http\Controllers'], function ($app) {

    // Country
    $app->get('country', [
        'as' => 'countries',
        'uses' => 'CountryController@listCountries'
    ]);
    $app->get('country/{id}', [
        'as' => 'country',
        'uses' => 'CountryController@getCountry'
    ]);

    // Day
    $app->get('day', [
        'as' => 'days',
        'uses' => 'DayController@listDays'
    ]);
    $app->get('day/{id}', [
        'as' => 'day',
        'uses' => 'DayController@getDay'
    ]);
    $app->post('day', 'DayController@createDay');
    $app->put('day/{id}', 'DayController@updateDay');
    $app->delete('day/{id}', 'DayController@deleteDay');

    // Event
    $app->get('event', [
        'as' => 'events',
        'uses' => 'EventController@listEvents'
    ]);
    $app->get('event/{id}', [
        'as' => 'event',
        'uses' => 'EventController@getEvent'
    ]);
    $app->post('event', 'EventController@createEvent');
    $app->put('event/{id}', 'EventController@updateEvent');
    $app->delete('event/{id}', 'EventController@deleteEvent');

    // Link
    $app->get('link', [
        'as' => 'links',
        'uses' => 'LinkController@listLinks'
    ]);
    $app->get('link/{id}', [
        'as' => 'link',
        'uses' => 'LinkController@getLink'
    ]);
    $app->post('link', 'LinkController@createLink');
    $app->put('link/{id}', 'LinkController@updateLink');
    $app->delete('link/{id}', 'LinkController@deleteLink');

    // Organizer
    $app->get('organizer', [
        'as' => 'organizers',
        'uses' => 'OrganizerController@listOrganizers'
    ]);
    $app->get('organizer/{id}', [
        'as' => 'organizer',
        'uses' => 'OrganizerController@getOrganizer'
    ]);
    $app->post('organizer', 'OrganizerController@createOrganizer');
    $app->put('organizer/{id}', 'OrganizerController@updateOrganizer');
    $app->delete('organizer/{id}', 'OrganizerController@deleteOrganizer');

    // Presenter
    $app->get('presenter', [
        'as' => 'presenters',
        'uses' => 'PresenterController@listPresenters'
    ]);
    $app->get('presenter/{id}', [
        'as' => 'presenter',
        'uses' => 'PresenterController@getPresenter'
    ]);
    $app->post('presenter', 'PresenterController@createPresenter');
    $app->put('presenter/{id}', 'PresenterController@updatePresenter');
    $app->delete('presenter/{id}', 'PresenterController@deletePresenter');

    // Room
    $app->get('room', [
        'as' => 'rooms',
        'uses' => 'RoomController@listRooms'
    ]);
    $app->get('room/{id}', [
        'as' => 'room',
        'uses' => 'RoomController@getRoom'
    ]);
    $app->post('room', 'RoomController@createRoom');
    $app->put('room/{id}', 'RoomController@updateRoom');
    $app->delete('room/{id}', 'RoomController@deleteRoom');

    // Session
    $app->get('session', [
        'as' => 'sessions',
        'uses' => 'SessionController@listSessions'
    ]);
    $app->get('session/{id}', [
        'as' => 'session',
        'uses' => 'SessionController@getSession'
    ]);
    $app->post('session', 'SessionController@createSession');
    $app->put('session/{id}', 'SessionController@updateSession');
    $app->delete('session/{id}', 'SessionController@deleteSession');

    // Series
    $app->get('series', [
        'as' => 'seriess',
        'uses' => 'DayController@listDays'
    ]);
    $app->get('series/{id}', [
        'as' => 'series',
        'uses' => 'DayController@getDay'
    ]);
    $app->post('series', 'SeriesController@createSeries');
    $app->put('series/{id}', 'SeriesController@updateSeries');
    $app->delete('series/{id}', 'SeriesController@deleteSeries');

    // Tag
    $app->get('tag', [
        'as' => 'tags',
        'uses' => 'TagController@listTags'
    ]);
    $app->get('tag/{id}', [
        'as' => 'tag',
        'uses' => 'TagController@getTag'
    ]);
    $app->post('tag', 'TagController@createTag');
    $app->put('tag/{id}', 'TagController@updateTag');
    $app->delete('tag/{id}', 'TagController@deleteTag');

    // Venue
    $app->get('venue', [
        'as' => 'venues',
        'uses' => 'VenueController@listVenues'
    ]);
    $app->get('venue/{id}', [
        'as' => 'venue',
        'uses' => 'VenueController@getVenue'
    ]);
    $app->post('venue', 'VenueController@createVenue');
    $app->put('venue/{id}', 'VenueController@updateVenue');
    $app->delete('venue/{id}', 'VenueController@deleteVenue');
});
{'fraction_non_alphanumeric': 0.2488984416980118, 'fraction_numerical': 0.00021493820526598603, 'mean_word_length': 3.1843525179856114, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 173, 'https://': 2, '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': '1634631', 'n_tokens_mistral': 2891, 'n_tokens_neox': 2919, 'n_words': 445}