<?php

/*
|--------------------------------------------------------------------------
| Module Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for this module.
| 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.
|
*/

Route::group(['prefix' => Config::get('app.api_path'), 'middleware' => ['web', 'auth']], function () {
    Route::get('stats/overview/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getActivity');
    Route::get('stats/overview/income', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getIncome');
    Route::get('stats/overview/feedback-stats', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getFeedbackStats');
    Route::get('stats/overview/graph', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getGraph');
    Route::get('stats/overview/pie-chart', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getPieChart');
    Route::get('stats/overview/users', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getUsers');
    Route::get('stats/user/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\UserControllerREST@getActivity');
    Route::get('stats/repairs/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getActivity');
    Route::get('stats/repairs/daily-summary', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getDailySummary');
    Route::get('stats/repairs/income', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getIncome');
    Route::get('stats/repairs/overview', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getOverview');
    Route::get('stats/repairs/graph', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getGraph');
    Route::get('stats/repairs/users', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getUsers');
    Route::get('stats/clients/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\CustomerControllerREST@getActivity');
});

Route::group(['middleware' => 'oauth', 'prefix' => 'oauth'], function () {
    Route::get('stats/overview/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getActivity');
    Route::get('stats/overview/income', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getIncome');
    Route::get('stats/overview/feedback-stats', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getFeedbackStats');
    Route::get('stats/overview/graph', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getGraph');
    Route::get('stats/overview/pie-chart', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getPieChart');
    Route::get('stats/overview/users', 'App\\Modules\\Stats\\controllers\\api\\v1\\OverviewControllerREST@getUsers');
    Route::get('stats/user/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\UserControllerREST@getActivity');
    Route::get('stats/repairs/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getActivity');
    Route::get('stats/repairs/daily-summary', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getDailySummary');
    Route::get('stats/repairs/income', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getIncome');
    Route::get('stats/repairs/overview', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getOverview');
    Route::get('stats/repairs/graph', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getGraph');
    Route::get('stats/repairs/users', 'App\\Modules\\Stats\\controllers\\api\\v1\\RepairsControllerREST@getUsers');
    Route::get('stats/clients/activity', 'App\\Modules\\Stats\\controllers\\api\\v1\\CustomerControllerREST@getActivity');
});
/*
|--------------------------------------------------------------------------
| Pages rendered on the server
|--------------------------------------------------------------------------
|
| This group routes are pages rendered on the server.
| All the pages require the user to be authentificated.
|
*/

Route::group(['middleware' => ['web', 'auth']], function () {
    Route::get('stats', 'App\\Modules\\Stats\\StatsController@getIndex');
});
